private void RespondToCollisionWithMario(Side side, IObject obj) { Mario mario = (Mario)obj; if (mario.IsStar || mario.PowerLevel() == MarioPowerLevel.Metal) { this.Spiny.Kill(); } else if (SideGeneralizer.IsBottom(side)) { this.Spiny.Kill(); } }
private void RespondToCollisionWithMario(Side side, IObject obj) { Mario mario = (Mario)obj; if (mario.IsStar || mario.PowerLevel() == MarioPowerLevel.Metal) { this.Koopa.SetDead(); } else if (SideGeneralizer.IsTop(side)) { this.Koopa.WillBecomeShell = true; this.Koopa.SetStomped(); } }
public void SpawnMario(Vector2 Position, String s) { IMario m = new Mario(Position, this.level); switch (s[1]) { case 'S': m.CurrentState = new SmallIdleRightFacingMarioState(m); this.level.Mario = m; break; case 'B': m.CurrentState = new BigIdleRightFacingMarioState(m); this.level.Mario = m; break; case 'F': m.CurrentState = new FireIdleRightFacingMarioState(m); this.level.Mario = m; break; } }
public MarioCollisionResponder(Mario mario) { this.Mario = mario; }