예제 #1
0
 /// <summary>
 /// Calls character updated and/or created events.
 /// </summary>
 public void FireUpdatedEvent(bool cancelled)
 {
     this.cancelled = cancelled;
     if (!this.cancelled && !isOfficiallyCreated)
     {
         isOfficiallyCreated = true;
         if (CharacterCreated != null)
         {
             CharacterCreated.Invoke(this);
         }
     }
     if (CharacterUpdated != null)
     {
         CharacterUpdated.Invoke(this);
     }
     dirty = false;
 }
예제 #2
0
 void OnDestroy()
 {
     if (isOfficiallyCreated)
     {
         if (CharacterDestroyed != null)
         {
             CharacterDestroyed.Invoke(this);
         }
         isOfficiallyCreated = false;
     }
     if (umaRoot != null)
     {
         CleanTextures();
         CleanMesh(true);
         CleanAvatar();
         Destroy(umaRoot);
     }
 }
예제 #3
0
 void OnDestroy()
 {
     if (isOfficiallyCreated)
     {
         if (CharacterDestroyed != null)
         {
             CharacterDestroyed.Invoke(this);
         }
         isOfficiallyCreated = false;
     }
     if (_hasUpdatedBefore)
     {
         cleanTextures();
         if (!onQuit)
         {
             cleanMesh(true);
             cleanAvatar();
         }
     }
 }