Exemplo n.º 1
0
 /// <summary>
 /// Find any new children.
 /// </summary>
 private void GetChildren()
 {
     foreach (Transform child in this.gameObject.transform)
     {
         MonoTexture monoTexture = child.gameObject.GetComponent <MonoTexture>();
         if (monoTexture != null)
         {
             AddNewBar(monoTexture);
         }
     }
 }
Exemplo n.º 2
0
    /// <summary>
    /// Add new Bar to 'Bars' List and let auto handle the position.
    /// </summary>
    /// <param name="newBar">Add new Bar to this Area.</param>
    public void AddNewBar(MonoTexture newBar)
    {
        //if the bar does not already exists, add it to the relevant list.
        if (!FloatList.OrderListBars.Contains(newBar))
        {
            //Initialize any new bar.
            newBar.InitializeBar();

            //Add new bar into list.
            FloatList.OrderListBars.Add(newBar);
        }
    }
Exemplo n.º 3
0
 void OnEnable()
 {
     monoTexture = (MonoTexture)target;
 }