public void HandleStaticCollision(string collisionLocation, IStaticObject staticObject)
 {
     EnemyStateTransitionMachine.StaticStateChange(collisionLocation, staticObject, this);
 }
        public Enemy(Vector2 position, string enemyState)
        {
            Position     = position;
            MaxVelocity  = new Vector2(GameValues.EnemyMaxXVelocity, GameValues.PhysicsMaxYVelocity);
            Acceleration = Vector2.Zero;
            EnemyStateTransitionMachine = new EnemyStateTransitionMachine();
            IsFlipped        = false;
            IsSlidingShell   = false;
            IsTongueCaptured = false;
            rand             = new Random();
            randBuffer       = 0;
            Fireball         = new Fireball(Vector2.Zero, false, true);

            koopaShellTimeout = GameValues.EnemyKoopaShellTimeout;
            deadGoombaTimeout = GameValues.EnemyDeadEnemyTimeout;


            if (enemyState == "WalkingGoomba")
            {
                EnemyState = new WalkingGoomba(position, this);
                Velocity   = new Vector2(-MaxVelocity.X, 0);
            }

            else if (enemyState == "RightWalkingKoopa")
            {
                EnemyState = new RightWalkingKoopa(position, this);
                Velocity   = new Vector2(MaxVelocity.X, 0);
            }

            else if (enemyState == "LeftWalkingKoopa")
            {
                EnemyState = new LeftWalkingKoopa(position, this);
                Velocity   = new Vector2(-MaxVelocity.X, 0);
            }

            else if (enemyState == "PiranhaPlant")
            {
                EnemyState = new PiranhaPlant(position, this);
            }

            else if (enemyState == "HidingInsideShellKoopa")
            {
                EnemyState = new HidingInsideShellKoopa(position, this);
            }

            else if (enemyState == "ComingOutOfShellKoopa")
            {
                EnemyState = new ComingOutOfShellKoopa(position, this);
            }

            else if (enemyState == "CrawfisLeft")
            {
                EnemyState = new CrawfisLeft(position, this);
                Velocity   = new Vector2(-MaxVelocity.X, 0);
            }

            else if (enemyState == "BowserLeft")
            {
                EnemyState = new BowserLeft(position, this);
                Velocity   = new Vector2(-MaxVelocity.X, 0);
            }

            else if (enemyState == "NoEnemy")
            {
                EnemyState = new NoEnemy(this);
            }

            CollisionRectangle = EnemyState.CollisionRectangle;
        }
 public void HandleDynamicCollision(string collisionDirection, IDynamicObject dynamicObject)
 {
     EnemyStateTransitionMachine.DynamicStateChange(collisionDirection, this, dynamicObject);
 }