void Start() { rb = GetComponent <Rigidbody2D>(); sprite = transform.Find("sprite").gameObject; animator = sprite.GetComponent <Animator>(); anime_para_list = new List <int>(); foreach (AnimatorControllerParameter parameter in animator.parameters) { anime_para_list.Add(parameter.nameHash); } foreach (Transform child in transform.Find("skills")) { GameObject child_obj = child.gameObject; skills.Add(child_obj); child.gameObject.SetActive(false); attack attack = child_obj.GetComponent <attack>(); if (attack != null) { attack.set_attacker(this); } } ec = GameObject.Find("effect_controller").GetComponent <effect_controller>(); ac = GameObject.Find("audio_controller").GetComponent <audio_controller>(); sc = GameObject.Find("spell_controller").GetComponent <spell_controller>(); bc = GameObject.Find("buff_controller").GetComponent <buff_controller>(); Start2(); }
public void set_speller(charactor speller_set) { speller = speller_set; bc = speller.get_bc(); ec = speller.get_ec(); sc = speller.get_sc(); }
public void init(int buff_code_set, charactor buff_from_set, charactor buff_to_set, int time_full_set, int wait_time_set, buff_controller buff_controller_set) { buff_code = buff_code_set; buff_from = buff_from_set; buff_to = buff_to_set; time_now = time_full = time_full_set; dispersable = false; wait_time = wait_time_set; buff_controller = buff_controller_set; init2(); }
void Start() { parent = transform.parent.gameObject; bearer = parent.GetComponent <charactor> (); player = GameObject.Find("hero").GetComponent <player> (); rb = parent.GetComponent <Rigidbody2D> (); ec = GameObject.Find("effect_controller").GetComponent <effect_controller> (); ac = GameObject.Find("audio_controller").GetComponent <audio_controller> (); bc = GameObject.Find("buff_controller").GetComponent <buff_controller> (); }
void Start() { parent = transform.parent.gameObject; bearer = parent.GetComponent <enemy> (); if (bearer == null) { bearer = parent.GetComponent <player> (); } rb = parent.GetComponent <Rigidbody2D> (); ec = GameObject.Find("effect_controller").GetComponent <effect_controller> (); ac = GameObject.Find("audio_controller").GetComponent <audio_controller> (); bc = GameObject.Find("buff_controller").GetComponent <buff_controller> (); }
void Start() { bc = GameObject.Find("buff_controller").GetComponent <buff_controller> (); ec = GameObject.Find("effect_controller").GetComponent <effect_controller> (); }