public void SetNotMorphed() { enabled = false; sphereCreature = null; if (Collider != null) { Collider.enabled = true; } if (Rigidbody != null) { Rigidbody.useGravity = true; } if (CreatureAI != null) { CreatureAI.StopRolling(); CreatureAI.ResumeRandomNavigation(); } }
public void SetMorphed(SphereCreature sphereCreature) { enabled = true; this.sphereCreature = sphereCreature; if (Collider != null) { Collider.enabled = false; } if (Rigidbody != null) { Rigidbody.useGravity = false; Rigidbody.velocity = Vector3.zero; Rigidbody.angularVelocity = Vector3.zero; } if (CreatureAI != null) { CreatureAI.StopAllNavigation(); CreatureAI.StartRolling(); } }