void Awake() { renderers = transform.parent.GetComponentsInChildren <MeshRenderer> (); mainGO = transform.parent.gameObject; animator = mainGO.GetComponent <Animator> (); loot = mainGO.GetComponent <LootSpawning> (); }
void Awake() { anim = GetComponent <Animator> (); stats = GetComponent <CharacterStats> (); loot = GetComponent <LootSpawning> (); if (loot) { Death += loot.SpawnLoot; } Death += Destroy; }