Example #1
0
        public Helpers.KeyMove GetInput(PossibleMoviment lastMoviment)
        {
            switch (lastMoviment)
            {
            case Helpers.PossibleMoviment.Down:
                return(new Helpers.KeyMove(null, new Vector2(0, -1), false));

            case Helpers.PossibleMoviment.Down_Left:
                return(new Helpers.KeyMove(null, new Vector2(-1, -1), false));

            case Helpers.PossibleMoviment.Down_Right:
                return(new Helpers.KeyMove(null, new Vector2(1, -1), true));

            case Helpers.PossibleMoviment.Left:
                return(new Helpers.KeyMove(null, new Vector2(-1, 0), false));

            case Helpers.PossibleMoviment.Right:
                return(new Helpers.KeyMove(null, new Vector2(1, 0), true));

            case Helpers.PossibleMoviment.Up:
                return(new Helpers.KeyMove(null, new Vector2(0, 1), false));

            case Helpers.PossibleMoviment.Up_Left:
                return(new Helpers.KeyMove(null, new Vector2(-1, 1), false));

            case Helpers.PossibleMoviment.Up_Right:
                return(new Helpers.KeyMove(null, new Vector2(1, 1), true));

            default:
                return(new Helpers.KeyMove(null, new Vector2(0, 0), false));
            }
        }
Example #2
0
 public Psm(PossibleMoviment possibleMoviment, bool flip)
 {
     this.PossibleMoviment = possibleMoviment;
     this.Flip             = flip;
 }