Esempio n. 1
0
    protected new void Start()
    {
        base.Start();

        int islandPeopleNum = Random.Range(minNumOfPeople, maxNumOfPeople + 1);

        food = Random.Range(5, 15);

        if (islandPeopleNum == 0)
        {
            message.text = "No one was found alive on this island.\nWe have found " + food +
                           " food on this island.\nProceed to next sector.";
        }
        else
        {
            for (int i = 0; i < islandPeopleNum; i++)
            {
                CrewMember c = CreateCrewMember(beach.GetRandomTile());
                otherPeople.Add(c);
                CreateButton(c, islandContent);
            }

            for (int i = 0; i < playerShip.crewMembers.Count; i++)
            {
                CrewMember c = playerShip.crewMembers [i];
                CreateButton(c, crewContent);
            }

            message.text = "We have found " + islandPeopleNum + " people alive on this island.\n" +
                           "We have found " + food + " food on this island.";
        }

        exchangeManager.SetActive(false);
        gameObject.SetActive(false);
        playerShip.AddInventory(food, 0, 0);

        CreateBoardingPlank();
    }
Esempio n. 2
0
    protected new void Start()
    {
        base.Start();

        int islandPeopleNum = Random.Range(minNumOfPeople, maxNumOfPeople + 1);

        food = Random.Range(foodMin, foodMax + 1);
        wood = Random.Range(woodMin, woodMax + 1);
        gold = Random.Range(goldMin, goldMax + 1);

        for (int i = 0; i < islandPeopleNum; i++)
        {
            CrewMember c = CreateCrewMember(beach.GetRandomTile());
            otherPeople.Add(c);
        }

        battleManager.Init(playerShip.GetBoardingTile(), beach.boardingTile);
    }