public void GoInvisible() { IsInvis = true; collider.enabled = false; currentStatus = EntityStatusState.Invis; for (int i = 0; i < renderers.Length; i++) { renderers[i].material = invisMaterial; } }
public void UnInvisible() { IsInvis = false; collider.enabled = true; currentStatus = EntityStatusState.Normal; for (int i = 0; i < renderers.Length; i++) { renderers[i].material = defaultMaterial[i]; } }
// Called when the entity dies public virtual void Die() { if (mc != null) { mc.CanMove = false; } currentStatus = EntityStatusState.Dead; collider.enabled = false; anim.SetTrigger("Dead"); }