Esempio n. 1
0
        public static void ConvertToManuallyUpdated(Text text)
        {
            if (mAutomaticallyUpdatedTexts.Contains(text))
            {
                mAutomaticallyUpdatedTexts.Remove(text);
            }

            text.UpdateDependencies(TimeManager.CurrentTime);
        }
Esempio n. 2
0
 private void HandleUnitDied(object sender, EventArgs notused)
 {
     UnitsCreatedByThis.Remove((Unit)sender);
     if (this.UnitsCreatedByThis.Count == 0)
     {
         HandleAllUnitsKilled();
     }
 }
Esempio n. 3
0
        static public Text AddText(Text textToAdd, Layer layerToAddTo)
        {
            if (layerToAddTo == null)
            {
                return(AddText(textToAdd));
            }
            else
            {
                if (textToAdd.ListsBelongingTo.Contains(mDrawnTexts))
                {
                    mDrawnTexts.Remove(textToAdd);
                }

                layerToAddTo.Add(textToAdd);

                if (textToAdd.ListsBelongingTo.Contains(mAutomaticallyUpdatedTexts) == false)
                {
                    mAutomaticallyUpdatedTexts.Add(textToAdd);
                }
                // otherwise no need to add it.

                return(textToAdd);
            }
        }
Esempio n. 4
0
 public void Remove(Text textToRemove)
 {
     mTexts.Remove(textToRemove);
 }