// Start is called before the first frame update void Awake() { player = FindObjectOfType <FreeMovement>(); if (player.startPoint == pointName) { player.transform.position = transform.position; player.lookDirection = lookDirection; } }
public Predator(Vector2 initialPosition, Allegiance allegiance) : base(initialPosition, allegiance) { Health = GlobalValues.GetInstance().PredatorHealth; mMovement = new FreeMovement(this); mSpaceshipAttackBehaviour = new SpaceshipAttackBehaviour(this); mMinionAttackBehaviour = new MinionAttackBehaviour(this); mVisibility = new Visibility(this); }
public DeathStar(Vector2 initialPosition, Allegiance allegiance, int minionCount) : base(initialPosition, allegiance) { MinionCount = minionCount; mMovementMode = false; Shield = 0; AttackTimer = 0; mSpaceshipAttackMode = false; mMovementMode = false; mPlanetAttackMode = false; mSpaceshipAttackBehaviour = new SpaceshipAttackBehaviour(this); mPlanetAttackBehaviour = new PlanetAttackBehaviour(this, AttackSpeedPlanet); mMovement = new FreeMovement(this); mVisibility = new Visibility(this); }
private void Awake() { moveInput = new HandleMoveInput(this); movement = new FreeMovement(moveInput, moveSettings, rb); }
private IEnumerator Init() { movement = player.GetComponent <FreeMovement>(); yield return(null); }
private void Start() { player = FindObjectOfType <FreeMovement>(); levelLoader = obj.GetComponent <Animator>(); }