Exemple #1
0
        public byte                      updated;   // updating UI, setting new components to entity

        public void Dispose()
        {
            if (skills.Length > 0)
            {
                skills.Dispose();
            }
        }
Exemple #2
0
 /// <summary>
 /// call before Destroying Character Entity
 /// </summary>
 public void Dispose()
 {
     if (characters.Length > 0)
     {
         characters.Dispose();
     }
 }
Exemple #3
0
 public void Dispose()
 {
     if (amount != 0)
     {
         characterIDs.Dispose();
     }
 }
Exemple #4
0
 public void Dispose()
 {
     if (body.Length > 0)
     {
         body.Dispose();
     }
 }
Exemple #5
0
 /// <summary>
 /// Only supports lowercase atm
 /// </summary>
 /// <param name="text"></param>
 public void SetText(string text)
 {
     if (fontIndexes.Length > 0)
     {
         fontIndexes.Dispose();
     }
     fontIndexes = StringToBytes(text.ToLower(), fontIndexes, out updated);
 }
Exemple #6
0
 public void Dispose()
 {
     if (stateUpdated.Length > 0)
     {
         stateUpdated.Dispose();
         stateMaxed.Dispose();
     }
 }
Exemple #7
0
 public void Dispose()
 {
     //regeningStates.Dispose();
     stats.Dispose();
     states.Dispose();
     regens.Dispose();
     attributes.Dispose();
     levels.Dispose();
 }
Exemple #8
0
        public void AddBranch(DialogueBranch branch)
        {
            // first store branches
            var branches_ = branches.ToArray();

            // now create new array
            if (branches.Length > 0)
            {
                branches.Dispose();
            }
            branches = new BlitableArray <DialogueBranch>(branches.Length + 1, Allocator.Persistent);
            // set old one
            for (int i = 0; i < branches.Length - 1; i++)
            {
                branches[i] = branches_[i];
            }
            // set new one
            branches[branches.Length - 1] = branch;
        }
Exemple #9
0
 public void Dispose(EntityManager EntityManager)
 {
     if (bones.Length > 0)
     {
         for (int i = 0; i < bones.Length; i++)
         {
             if (EntityManager.Exists(bones[i]))
             {
                 EntityManager.DestroyEntity(bones[i]);
             }
         }
         bones.Dispose();
     }
 }
Exemple #10
0
 public void AddPlayerCharacter(int characterID)
 {
     int[] previousPlayers = spawnedPlayerIDs.ToArray();
     if (spawnedPlayerIDs.Length > 0)
     {
         spawnedPlayerIDs.Dispose();
     }
     spawnedPlayerIDs = new BlitableArray <int>(previousPlayers.Length + 1, Unity.Collections.Allocator.Persistent);
     for (int i = 0; i < previousPlayers.Length; i++)
     {
         spawnedPlayerIDs[i] = previousPlayers[i];
     }
     spawnedPlayerIDs[spawnedPlayerIDs.Length - 1] = characterID;
 }
Exemple #11
0
 public void DestroyLetters(EntityManager entityManager)
 {
     if (letters.Length > 0)
     {
         Entity[] entities = letters.ToArray();
         foreach (Entity e in entities)
         {
             if (entityManager.Exists(e))
             {
                 entityManager.DestroyEntity(e);
             }
         }
         letters.Dispose();
     }
 }
Exemple #12
0
 public void DestroyEntities(EntityManager EntityManager)
 {
     for (int i = 0; i < children.Length; i++)
     {
         if (EntityManager.Exists(children[i]))
         {
             if (EntityManager.HasComponent <Childrens>(children[i]))
             {
                 Childrens childrensChildren = EntityManager.GetComponentData <Childrens>(children[i]);
                 childrensChildren.DestroyEntities(EntityManager);
             }
             if (EntityManager.HasComponent <RenderText>(children[i]))
             {
                 RenderText text = EntityManager.GetComponentData <RenderText>(children[i]);
                 text.DestroyLetters(EntityManager);
             }
             EntityManager.DestroyEntity(children[i]);
         }
     }
     if (children.Length > 0)
     {
         children.Dispose();
     }
 }
Exemple #13
0
 public void Dispose()
 {
     newIDs.Dispose();
     newRenders.Dispose();
     oldIDs.Dispose();
 }
Exemple #14
0
 public void Dispose()
 {
     items.Dispose();
 }