예제 #1
0
 public FlowerEntity(ItemFactory factory, Vector2 position) : base(factory)
 {
     item     = (Flower)spriteFactory.getSprite((int)itemTypes.FIREFLOWER);
     Velocity = Vector2.Zero;
     ItemSM   = new ItemStateMachine(this);
     ActiveTransition();
 }
예제 #2
0
 public MushroomEntity(ItemFactory factory, Vector2 position) : base(factory)
 {
     item              = (Mushroom)spriteFactory.getSprite((int)itemTypes.SUPERSHROOM);
     item.Position     = position;
     item.Velocity     = Vector2.Zero;
     item.Acceleration = Vector2.Zero;
     ItemSM            = new ItemStateMachine(this);
     ActiveTransition();
 }
예제 #3
0
 public StarEntity(ItemFactory factory, Vector2 position) : base(factory)
 {
     item          = (Star)spriteFactory.getSprite((int)itemTypes.ITEMSTAR);
     item.Position = position;
     Velocity      = Vector2.Zero;
     item.Velocity = Velocity;
     ItemSM        = new ItemStateMachine(this);
     ActiveTransition();
 }
예제 #4
0
 public CoinEntity(ItemFactory factory, Vector2 position) : base(factory)
 {
     item          = (Coin)spriteFactory.getSprite((int)itemTypes.COINS);
     item.Position = position;
     item.Velocity = Vector2.Zero;
     ItemSM        = new ItemStateMachine(this);
     ActiveTransition();
     HUD.CoinTracker.Subscribe(this);
     HUD.PointTracker.Subscribe(this);
 }
 protected AbstractItemState(ItemStateMachine sm, ItemEntity itemEnt)
 {
     StateMachine = sm;
     Item         = itemEnt;
 }
예제 #6
0
 public ActiveItemState(ItemStateMachine sm, ItemEntity item)
     : base(sm, item)
 {
 }
예제 #7
0
 public EmergingItemState(ItemStateMachine sm, ItemEntity item)
     : base(sm, item)
 {
 }