Beispiel #1
0
        public void Start()
        {
            items = new ActionItem[maxItems];

            actionBarGUIContainer = GameObjectFactory.NewGameObject("Action Bar GUI Container", gameObject.transform);
            ActionBarGUI.CreateComponent(actionBarGUIContainer, this, items, offset, tilesize);

            ActionBarController.CreateComponent(gameObject, this);
        }
Beispiel #2
0
        public static ActionBarGUI CreateComponent(GameObject parent, ActionBar actionBar, ActionItem[] items, Vector2 offset, int tilesize)
        {
            ActionBarGUI actionBarGUI = parent.AddComponent <ActionBarGUI>();

            actionBarGUI.actionBar = actionBar;
            actionBarGUI.items     = items;
            actionBarGUI.offset    = offset;
            actionBarGUI.tilesize  = tilesize;
            return(actionBarGUI);
        }