Exemple #1
0
        public void changeState(int direction)
        {
            /*
             * 1 = Down
             * 2 = Up
             * 4 = Right
             * 3 = Left
             * Default = Down
             */
            switch (direction)
            {
            case 1:
                state = new GoriyaWD(texture, projTexture, this);
                break;

            case 2:
                state = new GoriyaWU(texture, projTexture, this);
                break;

            case 3:
                state = new GoriyaWL(texture, projTexture, this);
                break;

            case 4:
                state = new GoriyaWR(texture, projTexture, this);
                break;

            default:
                state = new GoriyaWD(texture, projTexture, this);
                break;
            }
        }
Exemple #2
0
 public GoriyaEnemy(Texture2D inTexture, Texture2D inProjTexture, Vector2 position)
 {
     texture          = inTexture;
     projTexture      = inProjTexture;
     state            = new GoriyaWL(texture, projTexture, this);
     health           = 3;
     X                = (int)position.X;
     Y                = (int)position.Y;
     directionCounter = 0;
     directionFrame   = randomNumber.Next(200);
     direction        = randomNumber.Next(1, 4);
 }