Esempio n. 1
0
 public static void Stop(DataObjectTerrainEnemy dataObject)
 {
     BehaviourPhysics.Move(dataObject.gameObject, Vector2.zero, 0f);
 }
Esempio n. 2
0
 public static void Move(DataObjectTerrainEnemy dataObject, float direction, float velocity)
 {
     dataObject.transform.localScale = new Vector3(direction, 1, 1);
     BehaviourPhysics.MoveHorizontal(dataObject.gameObject, direction, velocity);
 }
 public ControllerTerrainEnemy(GameObject gameObject)
 {
     data = gameObject.GetComponent<DataObjectTerrainEnemy>();
     data.Controller = this;
 }
 public ControllerTerrainEnemy(GameObject gameObject,Transform target)
 {
     data = gameObject.GetComponent<DataObjectTerrainEnemy>();
     data.Controller = this;
     data.Target = target;
 }
Esempio n. 5
0
 void Start()
 {
     data = gameObject.GetComponent<DataObjectTerrainEnemy>();
     data.MoveVelocity = Random.Range(data.MoveVelocity - data.RandomVelocityModffier, data.MoveVelocity);
     attackTargetCoroutine = AtackTarget();
     switch (Status) {
         case "AttackStopped":
             StartCoroutine(attackTargetCoroutine);
             break;
         case "Normal" :
             chaseCoroutine = ChaseTarget();
             StartCoroutine(chaseCoroutine);
             StartCoroutine(attackTargetCoroutine);
             break;
     }
 }