mirror of
https://github.com/ConjureETS/Labo_2_Equ_1_a15.git
synced 2026-03-24 10:01:00 +00:00
31 lines
491 B
C#
31 lines
491 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class Patrolling : MonoBehaviour {
|
|
|
|
|
|
public float speed;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
this.transform.Translate(new Vector3(speed, 0, 0) * Time.deltaTime);
|
|
}
|
|
|
|
void FixedUpdate() {
|
|
}
|
|
|
|
public void setDirection(float value) {
|
|
speed = value;
|
|
}
|
|
|
|
public float getDirection() {
|
|
return speed;
|
|
}
|
|
|
|
}
|