Esempio n. 1
0
 void Awake()
 {
     manager = new GroupManager(caseSensitive);
     GroupManager.Group firstState = null;
     if (states != null)
     {
         foreach (string name in states)
         {
             if (!StringExt.IsNullOrWhitespace(name))
             {
                 GroupManager.Group s;
                 s = manager.Add(name);
                 if (firstState == null)
                 {
                     firstState = s;
                 }
             }
         }
     }
     if (main)
     {
         GroupManager.main = manager;
         if (firstState != null)
         {
             manager.activeGroup = firstState;
         }
     }
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        GroupDelegator delegator = new GroupDelegator(null, () => { _renderer.enabled = true; }, null);

        GroupManager.main.group["Main Menu"].Add(this, delegator);

        _renderer = GetComponent <SpriteRenderer>();
        _selector = GroupManager.main.group["Level Select"];
        _renderer.sortingLayerName = "Background";

        SetSunBackground();

        //ResetSize();
    }