Exemplo n.º 1
0
    void VerifySharedExperienceDistribution()
    {
        string[] names = new string[] { "Russell", "Brian", "Josh", "Ian", "Adam", "Andy" };

        Party heroes = new Party();

        for (int i = 0; i < names.Length; ++i)
        {
            GameObject actor = new GameObject(names[i]);
            actor.AddComponent <Stats>();
            Rank rank = actor.AddComponent <Rank>();
            //rank.Init(i);
            rank.Init((int)UnityEngine.Random.Range(1, 5));
            heroes.Add(actor);
        }

        Debug.Log("===== Before Adding Experience ======");
        LogParty(heroes);

        Debug.Log("=====================================");
        ExperienceManager.AwardExperience(1000, heroes);

        Debug.Log("===== After Adding Experience ======");
        LogParty(heroes);
    }
Exemplo n.º 2
0
    void VerifySharedExperienceDistribution()
    {
        string[] names  = new string[] { "Vaan", "Penelo", "Ramza", "Marche", "Agrias", "Mint" };
        Party    heroes = new Party();

        for (int i = 0; i < names.Length; ++i)
        {
            GameObject actor = new GameObject(names[i]);
            actor.AddComponent <Stats>();
            Rank rank = actor.AddComponent <Rank>();
            rank.Init((int)UnityEngine.Random.Range(1, 5));
            heroes.Add(actor);
        }
        Debug.Log("===== Before Adding Experience ======");
        LogParty(heroes);
        Debug.Log("=====================================");
        ExperienceManager.AwardExperience(1000, heroes);
        Debug.Log("===== After Adding Experience ======");
        LogParty(heroes);
    }