public Moving(GameObject stateableParam) { stateable = stateableParam; miniMegaTron = stateable.GetComponent<MiniMegaTronEnemy> (); Vector3 heading = stateable.transform.localPosition - miniMegaTron.enemyPos; float distance = heading.magnitude; direction = heading / distance; direction = -direction; direction.x *= 10; direction.y *= 4; if (direction.y > 0) stateable.GetComponent<Killable> ().Kill (); }
public Thinking(GameObject stateableParam) { stateable = stateableParam; miniMegaTron = stateable.GetComponent<MiniMegaTronEnemy> (); fire = false; }