Exemple #1
0
        //velocity: (-1,1)
        public override Vector2 getNewPosition(Vector2 position, Vector2 velocity)
        {
            Movement down = new MoveDown(seconds);
            Movement left = new MoveLeft(seconds);
            Vector2  temp = down.getNewPosition(position, velocity);

            return(left.getNewPosition(temp, velocity));
        }
        //velocity: (-1,1)
        public override Vector2 getNewPosition(Vector2 position, Vector2 velocity)
        {
            Movement up   = new MoveUp(seconds);
            Movement left = new MoveLeft(seconds);
            Vector2  temp = left.getNewPosition(position, velocity);

            return(up.getNewPosition(temp, velocity));
        }