// Start is called before the first frame update
    void Start()
    {
        ID = UnityEngine.Random.Range(0, 10000);

        baseStats = Instantiate(baseStats);

        stadium = GameObject.Find("Stadium").GetComponent <Stadium>();

        runtimeStats = new RuntimeCharacterStats(baseStats);
        runtimeStats.SetupValues();

        SetupEvents();
    }
Exemple #2
0
    // Update is called once per frame
    void Update()
    {
        if (character != null && runtimeCharacterStats != null && runtimeCharacterStats.characterName != "")
        {
            // test

            /*
             * runtimeCharacterStats.UpdateStats();
             * Setup();
             */
            UpdateUI();
        }
        else
        {
            character             = GameObject.Find(characterToDisplay).GetComponentInChildren <Character>();
            runtimeCharacterStats = character.runtimeStats;
            //Debug.Log(runtimeCharacterStats.characterName);
            Setup();
        }
    }