Beispiel #1
0
    public void Generate(Company company, int phase)
    {
        string name = GenerateName();

        int   maxRosterSize = MaxRosterSize(phase);
        float money         = Utilities.ToNearest(Utilities.RandomRange(moneyRange[phase]), 10f);

        List <Wrestler> roster       = new List <Wrestler>(); // @TODO Add wrestlers if necessary
        bool            isInAlliance = (Random.Range(0, 2) == 0) ? true : false;

        company.Initialize(name, money, maxRosterSize, phase, roster, isInAlliance);

        // Since popularity is a calculated value and not a stored one, fudge it by creating a dummy event with the desired rating.
        float popularity = Utilities.RandomRange(popularityRange[phase]);
        HistoricalWrestlingEvent wrestlingEvent = new HistoricalWrestlingEvent();

        wrestlingEvent.Initialize(name + "-event0", 0, 0, "<dummy>", "<dummy>", 0f, popularity);
        company.AddEvent(wrestlingEvent);
    }