protected override void OnDestroy()
 {
     base.OnDestroy();
     if (attribute.IsDead)
     {
         Util.ClearMaterial(gameObject);
     }
 }
Example #2
0
 protected override void OnDestroy()
 {
     MyEventSystem.myEventSystem.DropLocalListener(attribute.GetLocalId(), MyEvent.EventType.MeDead, OnDead);
     base.OnDestroy();
     if (attribute.IsDead)
     {
         Util.ClearMaterial(gameObject);
     }
 }