Example #1
0
 public virtual void FireFinishEvent(RemoveGameObjectEventArgs e)
 {
     if (FinishEvent != null)
     {
         FinishEvent(this, e);
     }
 }
Example #2
0
 public virtual void FireDestroyEvent(RemoveGameObjectEventArgs e)
 {
     if (DestroyEvent != null)
     {
         DestroyEvent(this, e);
     }
 }
Example #3
0
 public void OnEnemyFinish(object sender, RemoveGameObjectEventArgs e)
 {
     //remove enemy and load a new wave if no enemy left in the world
     RemoveEnemy(e.Index);
     if (enemies.Count == 0)
     {
         world.LoadWaves();
     }
 }
Example #4
0
        public void OnEnemyDestroy(object sender, RemoveGameObjectEventArgs e)
        {
            //Play Sound Effect
            explosion.Play();

            //remove enemy
            RemoveEnemy(e.Index);

            //add 30 score
            scoreManager.FireScoringEvent(new ScoreEventArgs(30));

            //if this is the last enemy in the world
            //load a new wave
            if (enemies.Count == 0)
            {
                world.LoadWaves();
            }

            //animation
            //audio
        }
Example #5
0
 public void OnFinish(object sender, RemoveGameObjectEventArgs e)
 {
     RemovePlayerProjecttile(e.Index);
 }
Example #6
0
 public void OnDestroy(object sender, RemoveGameObjectEventArgs e)
 {
     RemovePlayerProjecttile(e.Index);
     //play audio?
     //play animation?
 }
Example #7
0
 //On player character destroy, remove event listeners
 public void OnDestroy(object sender, RemoveGameObjectEventArgs e)
 {
     playerController.ChangeEvent -= gameWorld.EnemyManager.OnPlayerSpecialAttack;
     playerController.ChangeEvent -= OnChanged;
 }
Example #8
0
 //if player has collected the powerup
 //fire the power up event along with the power up bonus effect
 //remove the powerup from the list
 //add score
 //can add animation/ audio
 public void OnCollected(object sender, RemoveGameObjectEventArgs e)
 {
     powerUps[e.Index].FirePowerUpEvent(new PowerUpEventArgs(PowerUps[e.Index].BonusEffect));
     RemovePowerUp(e.Index);
     scoreManager.FireScoringEvent(new ScoreEventArgs(50));
 }
Example #9
0
 //if the object has left the viewzone, no longer avaible, remove object
 public void OnFinished(object sender, RemoveGameObjectEventArgs e)
 {
     RemovePowerUp(e.Index);
 }