public BlockMoving(int x, int y, int Distance, MovingType T, Boolean Start) { //ImageCount = 4; MaxDistance = Distance; Type = T; this.x = x; this.y = y; OT = ObjectType.OT_MovingBlock; SetWidthHeight(); width = 50; Dir = 2.0; if (Start) { Dir *= -1; } if (Type == MovingType.MT_UpDown) { StartPosition = newy; } else { StartPosition = newx; } MarioOn = false; TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnMove); }
public FireBall(int x, int y) : base(ObjectType.OT_FireBall) { Fire = false; Visible = false; AnimatedCount = 4; TimerGenerator.AddTimerEventHandler(TimerType.TT_100, OnAnimate); TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnFire); }
public Monster(int x, int y) : base(ObjectType.OT_Goomba) { AnimatedCount = 2; this.x = x; this.y = y; SetWidthHeight(); FallDie = false; TimerGenerator.AddTimerEventHandler(TimerType.TT_50, this.OnWalk); TimerGenerator.AddTimerEventHandler(TimerType.TT_100, this.OnAnimate); }
public BlockQuestion(int x, int y, ObjectType hidden) : base(ObjectType.OT_BlockQuestion) { AnimatedCount = 4; Hit = false; Open = false; this.x = x; this.y = y; SetWidthHeight(); CreateHidden(hidden); TimerGenerator.AddTimerEventHandler(TimerType.TT_100, OnAnimate); TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnBlockHit); }
public MushLife(int x, int y) : base(ObjectType.OT_MushLife) { ImageCount = 2; ImageIndex = 1; this.x = x; this.y = y; WalkStep = 2; SetWidthHeight(); Live = false; Visible = false; TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnWalk); }
public MonsterKoopa(int x, int y) : base(ObjectType.OT_Koopa) { this.x = x; this.y = y; ImageCount = 10; SetWidthHeight(); SetKoopaState(KoopaState.KS_Walking); Dir = KoopaDir.KD_Right; TimerGenerator.AddTimerEventHandler(TimerType.TT_50, this.OnWalk); TimerGenerator.AddTimerEventHandler(TimerType.TT_100, this.OnAnimate); }
public BlockBrickPiece(int x, int y, double SV, int D) : base(ObjectType.OT_BrickPiece) { AnimatedCount = 4; this.x = x; this.y = y; SetWidthHeight(); StartVelocity = SV; DirX = D; Running = false; TimeCount = 0; StartPosition = newy; TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnBrickPieceFall); TimerGenerator.AddTimerEventHandler(TimerType.TT_200, OnAnimate); }
public CoinBlock(int x, int y, Boolean MovingCoin) : base(ObjectType.OT_Coin) { if (MovingCoin) { Visible = false; Animated = false; } AnimatedCount = 4; this.x = x; this.y = y; MoveUp = false; SetWidthHeight(); TimerGenerator.AddTimerEventHandler(TimerType.TT_100, OnAnimate); }
public BlockBrick(int x, int y) : base(ObjectType.OT_Brick) { AnimatedCount = 4; this.x = x; this.y = y; SetWidthHeight(); TopRight = new BlockBrickPiece(x, y, -30, 1); TopLeft = new BlockBrickPiece(x, y, -30, -1); ButtomRight = new BlockBrickPiece(x, y, -15, 1); ButtomLeft = new BlockBrickPiece(x, y, -15, -1); AddObject(TopRight); AddObject(TopLeft); AddObject(ButtomRight); AddObject(ButtomLeft); TimerGenerator.AddTimerEventHandler(TimerType.TT_100, OnAnimate); }
public Character(int x, int y) : base(ObjectType.OT_Mario) { FireBalls = new List <FireBall>(); for (int i = 0; i < 2; i++) { FireBalls.Add(new FireBall(0, 0)); } for (int i = 0; i < 2; i++) { AddObject(FireBalls[i]); } Type = MarioType.MT_Small; SetMarioProperties(); this.x = x * 16; this.y = LevelGenerator.LevelHeight - 16 * y - height; Visible = true; UpPressed = false; Blinking = false; BlinkingShow = true; NumberOfCollectedCoins = 0; Moving = true; Jumping = false; Direction = MarioDir.MD_Right; EnterPressed = true; State = MarioJumpState.J_None; MoveState = MarioMoveState.J_Right; TimerGenerator.AddTimerEventHandler(TimerType.TT_100, OnAnimate); TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnJumpTick); TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnMoveTick); TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnCheckCollisions); }
public MonsterPiranah(int x, int y, PiranahType T) : base(ObjectType.OT_Pirana) { ImageCount = 10; Type = T; SetPiranahProperties(); Move = PiranaMove.PM_None; this.x = x; this.y = y; SetWidthHeight(); newx += 8; width = 16; OffY = 0; Live = true; Ball = new FireBall(0, 0); AddObject(Ball); TimerGenerator.AddTimerEventHandler(TimerType.TT_500, OnAnimate); TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnMove); }