public override void OnStateEnter() { if (!brain.AnimationModule) { brain.Start(); } brain.AnimationModule.SetActiveBoolTo(false); brain.GetComponent <Collider>().isTrigger = false; brain.TrailRenderer.enabled = false; brain.GetComponent <HealthController>().enabled = false; //brain.OrbTrigger.OnActivation += ActivationTriggerEvent; }
public override void OnStateEnter() { HealthController = brain.GetComponent <HealthController>(); if (HealthController) { brain.TrailRenderer.enabled = true; brain.AnimationModule.SetActiveBoolTo(true); brain.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezePositionY; brain.AnimationModule.OnActivationAnimationEnd += ActivationEndAnimationEvent; } else { brain.SetState(new DeadState(brain)); } }