/// Initialization when the skill is set to a character/hero. public void Init(int index, Character characterBelongTo, CharacterSkillController heroBelongTo, SkillUIController uiBelongTo) { sIndex = index; mc = characterBelongTo; hero = heroBelongTo; ui = uiBelongTo; currentHasEnoughMana = (mc.Chp.CurrentMP >= skillDataInstance.enegyCost); }
void Awake() { Debug.Log("Character Awake!"); rb = GetComponent <Rigidbody>(); cpc = GetComponent <CapsuleCollider>(); spr = GetComponentInChildren <SpriteRenderer>(); ads = GetComponent <AudioSource>(); chp = GetComponent <CharacterHP>(); cmm = GetComponent <CharacterMovement>(); csc = GetComponentInChildren <CharacterSkillController>(); cbc = GetComponentInChildren <CharacterBuffController>(); mcData = Instantiate(dataDefault); ResetAllCharacterData(); }