public byte updated; // updating UI, setting new components to entity public void Dispose() { if (skills.Length > 0) { skills.Dispose(); } }
/// <summary> /// call before Destroying Character Entity /// </summary> public void Dispose() { if (characters.Length > 0) { characters.Dispose(); } }
public void Dispose() { if (amount != 0) { characterIDs.Dispose(); } }
public void Dispose() { if (body.Length > 0) { body.Dispose(); } }
/// <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); }
public void Dispose() { if (stateUpdated.Length > 0) { stateUpdated.Dispose(); stateMaxed.Dispose(); } }
public void Dispose() { //regeningStates.Dispose(); stats.Dispose(); states.Dispose(); regens.Dispose(); attributes.Dispose(); levels.Dispose(); }
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; }
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(); } }
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; }
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(); } }
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(); } }
public void Dispose() { newIDs.Dispose(); newRenders.Dispose(); oldIDs.Dispose(); }
public void Dispose() { items.Dispose(); }