private void PlaceEnemies(Double left, Double top) { Enemy1.Move(Enemy1.Left + left, Enemy1.Top + top); Enemy2.Move(Enemy1.Left + GameConfigurations.EnemyWidth * 1.5, Enemy1.Top); Enemy3.Move(Enemy2.Left + GameConfigurations.EnemyWidth * 1.5, Enemy1.Top); Enemy4.Move(Enemy3.Left + GameConfigurations.EnemyWidth * 1.5, Enemy1.Top); Enemy5.Move(Enemy1.Left * 1.5, Enemy1.Top + GameConfigurations.EnemyHeight * 1.5); Enemy6.Move(Enemy5.Left + GameConfigurations.EnemyWidth * 1.5, Enemy5.Top); Enemy7.Move(Enemy6.Left + GameConfigurations.EnemyWidth * 1.5, Enemy5.Top); Enemy8.Move(Enemy7.Left + GameConfigurations.EnemyWidth * 1.5, Enemy5.Top); Enemy9.Move(Enemy1.Left * 1.25, Enemy5.Top + GameConfigurations.EnemyHeight * 1.5); Enemy10.Move(Enemy9.Left + GameConfigurations.EnemyWidth * 1.5, Enemy9.Top); Enemy11.Move(Enemy10.Left + GameConfigurations.EnemyWidth * 1.5, Enemy9.Top); Enemy12.Move(Enemy11.Left + GameConfigurations.EnemyWidth * 1.5, Enemy9.Top); Enemy13.Move(Enemy1.Left * 1.5, Enemy10.Top + GameConfigurations.EnemyHeight * 1.5); Enemy14.Move(Enemy13.Left + GameConfigurations.EnemyWidth * 1.5, Enemy13.Top); Enemy15.Move(Enemy14.Left + GameConfigurations.EnemyWidth * 1.5, Enemy13.Top); Enemy16.Move(Enemy15.Left + GameConfigurations.EnemyWidth * 1.5, Enemy13.Top); Enemy17.Move(Enemy1.Left, Enemy13.Top + GameConfigurations.EnemyHeight * 1.5); Enemy18.Move(Enemy17.Left + GameConfigurations.EnemyWidth * 1.5, Enemy17.Top); Enemy19.Move(Enemy18.Left + GameConfigurations.EnemyWidth * 1.5, Enemy17.Top); Enemy20.Move(Enemy19.Left + GameConfigurations.EnemyWidth * 1.5, Enemy17.Top); }
public void Execute() { if (enemy.Target != null) { enemy.Move(); } else { enemy.changeState(new IdleState()); } }
public void Execute() { Debug.Log("Patrolling"); Patrol(); enemy.Move(); if (enemy.Target != null) { enemy.changeState(new AttackState()); } }
public void Execute() { Walk(); locatorTimer += Time.deltaTime; if (locatorTimer > difficultyUtils.locateAfter) { enemy.LocatePlayer(); locatorTimer = 0; } if (!animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy2_blast")) { enemy.Move(); } }