示例#1
0
    void initCardInfo()
    {
        if (debugReady) {

            //
            associatedCharacterBehavior = associatedCharacter.GetComponent<CharacterBehavior> ();
            associatedCharacterBehavior.initCharacter ();

            firstName.text = associatedCharacterBehavior.getFirstName ().ToUpper();
            lastName.text = associatedCharacterBehavior.getLastName ().ToUpper();

            // -- Intitialize the stat bars on the card --

                Color32 faded = new Color32 (167, 167, 167, 128);

                healthPips = healthBar.gameObject.GetComponentsInSiblings<Image>();
                healthPips.updatePips(associatedCharacterBehavior.getHP(), Color.white, faded);

                movePips = moveBar.gameObject.GetComponentsInSiblings<Image>();
                movePips.updatePips(associatedCharacterBehavior.getMoveStat(), Color.white, faded);

                gunPips = gunBar.gameObject.GetComponentsInSiblings<Image>();
                gunPips.updatePips(associatedCharacterBehavior.getGunStat(), Color.white, faded);

                CQCPips = CQCBar.gameObject.GetComponentsInSiblings<Image>();
                CQCPips.updatePips(associatedCharacterBehavior.getCQCStat(), Color.white, faded);
        }

            onColor = Color.white;
            offColor = Color.grey;
            currentColor = offColor;
    }