예제 #1
0
 public static void Stop(DataObjectTerrainEnemy dataObject)
 {
     BehaviourPhysics.Move(dataObject.gameObject, Vector2.zero, 0f);
 }
예제 #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);
 }
예제 #3
0
 public ControllerTerrainEnemy(GameObject gameObject)
 {
     data = gameObject.GetComponent<DataObjectTerrainEnemy>();
     data.Controller = this;
 }
예제 #4
0
 public ControllerTerrainEnemy(GameObject gameObject,Transform target)
 {
     data = gameObject.GetComponent<DataObjectTerrainEnemy>();
     data.Controller = this;
     data.Target = target;
 }
예제 #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;
     }
 }