Пример #1
0
    public void setPlayerNumber()
    {
        Mule1 mule = new Mule1();

        assignedMonsters.monsterPlayers.Add(mule);
        if (assignedMonsters.monsterPlayers.Count == 6)
        {
            SceneManager.LoadScene("Game Board");
        }
    }
Пример #2
0
        public Ship CreateShip(int model, float x, float y, float rot, int id)
        {
            Ship ship = null;

            switch (model)
            {
            case 1:
            {
                ship = new Interceptor1(contentManager)
                {
                    CombatManager = _combatManager
                };
                break;
            }

            case 2:
            {
                ship = new Mule1(contentManager);
                break;
            }

            case 3:
            {
                ship = new Collector(contentManager)
                {
                    CombatManager = _combatManager
                };
                break;
            }

            case 4:
            {
                ship = new Elephant(contentManager);
                break;
            }

            case 5:
            {
                ship = new Unicorn(contentManager);
                break;
            }

            case 6:
            {
                ship = new PirateSniper(contentManager)
                {
                    CombatManager = _combatManager
                };
                break;
            }

            case 7:
            {
                ship = new PirateBrawler(contentManager);
                break;
            }

            default:
            {
                break;
            }
            }
            ship.Position = new Vector2(x, y);
            ship.Rotation = rot;
            ship.ID       = id;
            return(ship);
        }