Esempio n. 1
0
        public bool shoot(Game1WithoutKinect.Direction dir)
        {
            if (MyPlayer.getArrows() >= 1)
            {
                Room NextRoom = MyCave.getConnectedRooms(MyMap.getPlayerRoom().getDecimalForm())[(int)(dir)];
                MyPlayer.setArrows(MyPlayer.getArrows() - 1);
                if (NextRoom != null)
                {
                    won = MyMap.ShootArrow(NextRoom);
                    if (won)
                    {
                        GameState = Gstate.EndGame;
                    }

                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }