public StaticCoin(int locX, int locY)
 {
     score              = new NonPlayerScoreItem(UtilityClass.coinScore, false);
     location           = new Vector2(locX, locY);
     sprite             = new StaticCoinSprite(location);
     type               = ItemType.Coin;
     collisionRectangle = sprite.returnCollisionRectangle();
     testForCollision   = true;
     rigidbody          = new AutonomousPhysicsObject();
 }
 public IceFlower(int locX, int locY)
 {
     score             = new NonPlayerScoreItem(UtilityClass.itemScore, false);
     location          = new Vector2(locX, locY);
     iceFlowerSprite   = new IceFlowerSprite(location);
     type              = ItemType.IceFlower;
     collisonRectangle = iceFlowerSprite.returnCollisionRectangle();
     testForCollision  = true;
     riseSpeed         = UtilityClass.iceFlowerRiseSpeed;
     rigidbody         = new AutonomousPhysicsObject();
 }
 public SuperMushroom(int locX, int locY)
 {
     score              = new NonPlayerScoreItem(UtilityClass.itemScore, false);
     location           = new Vector2(locX, locY);
     sprite             = new SuperMushroomSprite(location);
     type               = ItemType.SuperMushroom;
     collisionRectangle = sprite.returnCollisionRectangle();
     testForCollision   = true;
     rigidbody          = new AutonomousPhysicsObject();
     LoadRigidBodyProperties();
 }
 public Goomba(int locX, int locY)
 {
     score           = new NonPlayerScoreItem(100, true);
     location        = new Vector2(locX, locY);
     state           = new GoombaHealthy(this);
     frozen          = false;
     freezeCounter   = UtilityClass.zero;
     enemyFreezeTime = UtilityClass.enemyFreezeTime;
     rigidbody       = new AutonomousPhysicsObject();
     LoadRigidBodyProperties();
 }
 public BoxCoin(int locX, int locY)
 {
     score            = new NonPlayerScoreItem(UtilityClass.coinScore, false);
     location         = new Vector2(locX, locY);
     boxCoinSprite    = new BoxCoinSprite(location);
     type             = ItemType.BoxCoin;
     testForCollision = true;
     moveSpeed        = UtilityClass.coinMoveSpeed;
     decayRate        = UtilityClass.coindecayRate;
     animate          = true;
     timer            = UtilityClass.CoinTimer;
     rigidbody        = new AutonomousPhysicsObject();
 }
예제 #6
0
 public Fireball(int x, int y, float spawnSpeed, bool facingRight, IPlayer shooter)
 {
     spawnGroundSpeed  = spawnSpeed;
     spawnGroundSpeed += facingRight ? UtilityClass.one : -UtilityClass.one;
     location          = new Vector2(x, y);
     sprite            = new FireballSprite(location);
     testForCollision  = true;
     timer             = UtilityClass.fireballTimer;
     rigidbody         = new AutonomousPhysicsObject();
     owner             = shooter;
     LoadRigidBodyProperties();
     SoundEffectFactory.Fireball();
     type = ProjectileType.Fireball;
 }
예제 #7
0
 public Koopa(int locX, int locY)
 {
     score     = new NonPlayerScoreItem(100, true);
     location  = new Vector2(locX, locY);
     state     = new KoopaHealthy(this);
     rigidbody = new AutonomousPhysicsObject();
     LoadRigidBodyProperties();
     directionLeft   = false;
     shellForm       = false;
     hurtMario       = true;
     frozen          = false;
     freezeCounter   = UtilityClass.zero;
     enemyFreezeTime = UtilityClass.enemyFreezeTime;
 }