Exemple #1
0
 public FireFlower(
     IWorld world,
     Point location,
     IListener <IGameObject> listener,
     IListener <ISoundable> soundListener,
     bool isUnveil = false) : base(
         world,
         location,
         listener,
         new Point(32, 32))
 {
     soundListener.Subscribe(this);
     SoundEventArgs = new SoundArgs();
     SoundEventArgs.SetMethodCalled();
     collected = false;
     if (isUnveil)
     {
         state = new Unveil(this);
         UpdateSprite();
     }
     else
     {
         state = new Normal(this);
         UpdateSprite();
     }
 }
Exemple #2
0
 public Flag(IWorld world, Point location, Point size, int height) : base(world, location, size)
 {
     this.height    = height;
     pulling        = false;
     SoundEventArgs = new SoundArgs();
     ShowSprite(SpriteFactory.Instance.CreateFlagSprite(false));
 }
Exemple #3
0
 public Question(IWorld world, Point location, IListener <IGameObject> listener, IListener <ISoundable> soundListener, bool isHidden = false) :
     base(world, location, listener, new Point(32, 32))
 {
     Initialize(isHidden);
     soundListener.Subscribe(this);
     SoundEventArgs = new SoundArgs();
 }
Exemple #4
0
        public Pipeline(IWorld world, Point location, IListener <IGameObject> listener, string type) : base(
                world,
                location,
                listener,
                new Point(32, 32))
        {
            Type = type;

            SoundEventArgs = new SoundArgs();
            UpdateSprite();
        }
Exemple #5
0
 public Mario(
     IWorld world,
     Point location,
     IListener <IGameObject> listener,
     IListener <ISoundable> soundListener) : base(
         world,
         location,
         listener,
         new Point(),
         32)
 {
     listener.Subscribe(this);
     soundListener.Subscribe(this);
     SoundEventArgs  = new SoundArgs();
     powerUpState    = new Standard(this);
     movementState   = new Standing(this);
     protectionState = new ProtectionStates.Normal(this);
     UpdateSprite();
 }
Exemple #6
0
 public SuperMushroom(
     IWorld world,
     Point location,
     IListener <IGameObject> listener,
     IListener <ISoundable> soundListener,
     bool isUnveil = false) : base(world, location, listener, new Point(32, 32), 32)
 {
     collected          = false;
     this.listener      = listener;
     this.soundListener = soundListener;
     soundListener.Subscribe(this);
     SoundEventArgs = new SoundArgs();
     SoundEventArgs.SetMethodCalled();
     if (isUnveil)
     {
         state = new Unveil(this);
         UpdateSprite();
     }
     else
     {
         state = new SuperMushroomStates.Normal(this);
         UpdateSprite();
     }
 }
Exemple #7
0
 public Coin(
     IWorld world,
     Point location,
     IListener <IGameObject> listener,
     IListener <ISoundable> soundListener,
     bool isUnveil = false) : base(world, location, null, new Point(32, 32))
 {
     listener.Subscribe(this);
     soundListener.Subscribe(this);
     collected = false;
     //eventually if coin needs to pass info put it in eventinfo
     coinEventInfo  = EventArgs.Empty;
     SoundEventArgs = new SoundArgs();
     if (isUnveil)
     {
         state = new Unveil(this);
         UpdateSprite();
     }
     else
     {
         state = new Normal(this);
         UpdateSprite();
     }
 }