Exemple #1
0
            private static void DisplayStatusHud(BattleUnit bd, IconsWidget statusHud, Dictionary <BattleStatus, String> iconDic)
            {
                statusHud.IsActive = true;
                foreach (GOSprite uiWidget in statusHud.Icons.Entries)
                {
                    uiWidget.Sprite.alpha = 0.0f;
                }

                Int32 index = 0;

                foreach (KeyValuePair <BattleStatus, String> current in iconDic)
                {
                    if (!bd.IsUnderAnyStatus(current.Key))
                    {
                        continue;
                    }

                    GOSprite spriteObj = statusHud.Icons[index];
                    spriteObj.Sprite.alpha      = 1f;
                    spriteObj.Sprite.spriteName = current.Value;

                    if (++index > statusHud.Icons.Count)
                    {
                        break;
                    }
                }
            }
Exemple #2
0
 public CaptionBackground(GameObject obj)
     : base(obj)
 {
     TopBorder = new GOSprite(obj.GetChild(0));
     Border    = new GOSprite(obj.GetChild(1));
     Body      = new GOSprite(obj.GetChild(2));
     Content   = Create <T1>(obj.GetChild(3));
 }
 public CaptionBackground(GameObject obj)
     : base(obj)
 {
     TopBorder = new GOSprite(obj.GetChild(0));
     Caption1  = new GOLocalizableLabel(obj.GetChild(1));
     HP        = new GOLocalizableLabel(obj.GetChild(2));
     MP        = new GOLocalizableLabel(obj.GetChild(3));
     ATB       = new GOLocalizableLabel(obj.GetChild(4));
 }
            public ButtonBack(GameObject obj)
                : base(obj)
            {
                Button         = obj.GetExactComponent <UIButton>();
                BoxCollider    = obj.GetExactComponent <BoxCollider>();
                OnScreenButton = obj.GetExactComponent <OnScreenButton>();

                Background = new GOThinSpriteBackground(obj.GetChild(0));
                Highlight  = new GOSprite(obj.GetChild(1));
                Icon       = new GOSprite(obj.GetChild(2));
            }
            public ButtonRun(GameObject obj)
                : base(obj)
            {
                UIButton[] buttons = obj.GetExactComponents <UIButton>();
                Button1     = buttons[0];
                Button2     = buttons[1];
                BoxCollider = obj.GetExactComponent <BoxCollider>();

                Background = new GOThinSpriteBackground(obj.GetChild(0));
                Highlight  = new GOSprite(obj.GetChild(1));
                Icon       = new GOSprite(obj.GetChild(2));
            }
                public Character(GameObject obj)
                    : base(obj)
                {
                    Name      = new GOLabel(obj.GetChild(0));
                    HP        = new GOLabel(obj.GetChild(1));
                    MP        = new GOLabel(obj.GetChild(2));
                    ATBBar    = new GOProgressBar(obj.GetChild(3));
                    TranceBar = new GOProgressBar(obj.GetChild(4));
                    Highlight = new GOSprite(obj.GetChild(5));

                    Label         = obj.GetComponent <UILabel>();
                    ButtonGroup   = obj.GetComponent <ButtonGroupState>();
                    ButtonColor   = obj.GetComponent <UIButtonColor>();
                    EventListener = obj.EnsureExactComponent <UIEventListener>();
                }