Пример #1
0
        public GoombaChar(EnemyFactory factory, Vector2 position)
            : base(factory)
        {
            enemy              = (Enemy1)spriteFactory.getSprite((int)enemyTypes.GOOMBA);
            enemy.Position     = position;
            enemy.Velocity     = Vector2.Zero;
            enemy.Acceleration = Vector2.Zero;

            enemySM           = new GoombaStateMachine(this);
            CurrentEnemyState = enemySM.Inactive;

            Width  = enemy.Width;
            Height = 16;
        }
 public InactiveGoombaState(GoombaStateMachine sm, EnemyEntity enemy)
     : base(sm, enemy)
 {
     Animation = new GoombaDead();
 }
Пример #3
0
 public Goomba(Vector2 location)
 {
     stateMachine = new GoombaStateMachine(location);
     Physics      = new GoombaPhysics(this);
 }
Пример #4
0
 public ActiveGoombaState(GoombaStateMachine sm, EnemyEntity enemy)
     : base(sm, enemy)
 {
     Animation = new GoombaWalking();
 }