public void Left(Mario mario) { if (!mario.Parameters.IsLeft) { mario.ChangeToIdle(); } }
public void CollideWithEnemy(bool isTop, ICharacter character) { /* * if Mario collide enemy from left, right or hit enemy's bottom, Mario is destroyed * If the enemy is a plant enemy, no matter which point Mario collides with, Mario is destroyed */ if (!isTop || character is PlantEnemyCharacter || character is CloudEnemyCharacter) { Mario.MarioState.Destroy(); if (Mario.MarioState.GetPowerType != MarioState.PowerType.Died)// if Mario is still alive { ChangeToStarState(15); } } if (character is BossEnemyCharacter) { Mario.MarioState.ChangeToDied(); } if (Mario.MarioState.GetPowerType != MarioState.PowerType.Died) { Mario.ChangeToIdle(); } }
public void Return(Mario mario) { mario.ChangeToIdle(); }
public void Up(Mario mario) { mario.ChangeToIdle(); } // only Super and Fire can call this method
public void Leave(Mario mario) { mario.ChangeToIdle(); }