예제 #1
0
    protected override void Start()
    {
        base.Start();

        // Start Looking To Player
        spriteDirection.FaceDirection(LookAtPlayer.LookToPlayerDirection(transform.position));

        // notify
        GameEvents.Enemies.ZombieSpawned.SafeCall();
    }
예제 #2
0
    protected override void Start()
    {
        // Start Looking To Player
        spriteDirection.FaceDirection(LookAtPlayer.LookToPlayerDirection(transform.position));

        // wait for cooldown before starts shooting
        canShoot = false;
        MyExtensions.WaitAndAct(this, shootingCooldown, () => canShoot = true);

        //notify spawn
        GameEvents.Enemies.WoodyPigSpawned.SafeCall();
    }
예제 #3
0
 public void LookToPlayer()
 {
     spriteDirection.FaceDirection(LookAtPlayer.LookToPlayerDirection(transform.position));
 }
예제 #4
0
 public void TurnToPlayer()
 {
     FaceDirection(LookAtPlayer.LookToPlayerDirection(transform.position));
 }