You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
411 B
17 lines
411 B
3 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
|
||
|
public class GunDongScript : MonoBehaviour {
|
||
|
|
||
|
private float mSpeed = 80.0F;
|
||
|
void Update()
|
||
|
{
|
||
|
//Translate form right to left
|
||
|
transform.Translate(Vector3.left * Time.deltaTime * mSpeed);
|
||
|
if (transform.localPosition.x <= -426f)
|
||
|
{
|
||
|
transform.localPosition = new Vector3(1078f, -158.5f, 0);
|
||
|
}
|
||
|
}
|
||
|
}
|