public override void Awake() { base.Awake(); soundPlayer = ScriptableObject.CreateInstance <SoundNodePlayer>(); Model = gameObject; ObjectRenderer = GetComponentInChildren <SkinnedMeshRenderer>(); Parent = ObjectRenderer.transform.parent.gameObject; HealthBar = Instantiate(GameScene.RedHealthBar, NameLabel.transform).GetComponent <Renderer>(); GetComponentInChildren <MonsterAnimationController>()?.SetParent(this); }
void Awake() { GameManager.User = this; soundPlayer = ScriptableObject.CreateInstance <SoundNodePlayer>(); }