示例#1
0
        protected void NewGame()
        {
            player = -1;
            if (ducks == null)
                ducks = new Duck[16];

            for (int i = 0; i < 16; i++)
            {
                Duck d = ducks[i];
                if (d == null)
                {
                    if (i < map.NumberOfStartPositions)
                    {
                        d = new Duck(i, map.GetStartPosition(i).position, map);
                        d.Reset();
                    }
                }
                else
                {
                    d.NewGameReset(map.GetStartPosition(i).position, map);
                }
            }

            NextDuck();
            ChangeState(State.Playing);
            camera.Reset();
            map.Reset();
        }