Example #1
0
    public void Setup(CharacterDefinition definition)
    {
#if UNITY_EDITOR
        if (characterUI == null)
        {
            characterUI = GetComponent <CombatCharacterUI>();
        }
#endif
        this.definition    = definition;
        this.currentHealth = definition == null? 0 : definition.Health;
        characterUI.OnDefinitionChange(definition);
    }
Example #2
0
 private void Start()
 {
     characterUI = GetComponent <CombatCharacterUI>();
 }
Example #3
0
 protected override void Start()
 {
     base.Start();
     characterUI = slot.GetComponent <CombatCharacterUI>();
 }