コード例 #1
0
ファイル: StatusUI.cs プロジェクト: uzoko1/Memoria
 protected void Awake()
 {
     FadingComponent   = ScreenFadeGameObject.GetComponent <HonoFading>();
     _characterHud     = new CharacterDetailHUD(CharacterDetailPanel, false);
     _parameterHud     = new ParameterDetailHUD(ParameterDetailPanel);
     _equipmentHud     = new EquipmentDetailHud(EquipmentDetailPanel);
     _tranceGameObject = ETCInfo.GetChild(0);
     _tranceSlider     = ETCInfo.GetChild(0).GetChild(2).GetComponent <UISlider>();
     _expLabel         = ETCInfo.GetChild(1).GetChild(2).GetComponent <UILabel>();
     _nextLvLabel      = ETCInfo.GetChild(2).GetChild(3).GetComponent <UILabel>();
     _attackLabel      = CommandDetailPanel.GetChild(0).GetComponent <UILabel>();
     _ability1Label    = CommandDetailPanel.GetChild(1).GetComponent <UILabel>();
     _ability2Label    = CommandDetailPanel.GetChild(2).GetComponent <UILabel>();
     _itemLabel        = CommandDetailPanel.GetChild(3).GetComponent <UILabel>();
     for (int index = 0; index < AbilityPanelList.Count; ++index)
     {
         for (int childIndex = 0; childIndex < 8; ++childIndex)
         {
             //int num = index * 8 + childIndex;
             _abilityHudList.Add(new AbilityItemHUD(AbilityPanelList[index].GetChild(0).GetChild(childIndex)));
         }
         _abilityCaptionList.Add(AbilityPanelList[index].GetChild(1).GetChild(3));
     }
     _abilityPanelTransition = TransitionGroup.GetChild(0).GetComponent <HonoTweenPosition>();
     _avatarTransition       = CharacterDetailPanel.GetChild(0).GetChild(6).GetChild(0).GetComponent <HonoAvatarTweenPosition>();
 }
コード例 #2
0
ファイル: StatusUI.cs プロジェクト: ArtReeX/memoria
    protected void Awake()
    {
        FadingComponent   = ScreenFadeGameObject.GetComponent <HonoFading>();
        _characterHud     = new CharacterDetailHUD(CharacterDetailPanel, false);
        _parameterHud     = new ParameterDetailHUD(ParameterDetailPanel);
        _equipmentHud     = new EquipmentDetailHud(EquipmentDetailPanel);
        _tranceGameObject = ETCInfo.GetChild(0);
        _tranceSlider     = ETCInfo.GetChild(0).GetChild(2).GetComponent <UISlider>();
        _expLabel         = ETCInfo.GetChild(1).GetChild(2).GetComponent <UILabel>();
        _nextLvLabel      = ETCInfo.GetChild(2).GetChild(3).GetComponent <UILabel>();
        _attackLabel      = CommandDetailPanel.GetChild(0).GetComponent <UILabel>();
        _ability1Label    = CommandDetailPanel.GetChild(1).GetComponent <UILabel>();
        _ability2Label    = CommandDetailPanel.GetChild(2).GetComponent <UILabel>();
        _itemLabel        = CommandDetailPanel.GetChild(3).GetComponent <UILabel>();
        for (Int32 index = 0; index < AbilityPanelList.Count; ++index)
        {
            for (Int32 childIndex = 0; childIndex < 8; ++childIndex)
            {
                //int num = index * 8 + childIndex;
                _abilityHudList.Add(new AbilityItemHUD(AbilityPanelList[index].GetChild(0).GetChild(childIndex)));
            }
            _abilityCaptionList.Add(AbilityPanelList[index].GetChild(1).GetChild(3));
        }
        _abilityPanelTransition = TransitionGroup.GetChild(0).GetComponent <HonoTweenPosition>();
        _avatarTransition       = CharacterDetailPanel.GetChild(0).GetChild(6).GetChild(0).GetComponent <HonoAvatarTweenPosition>();

        this._characterHud.MagicStoneLabel.SetAnchor((Transform)null);
        this._characterHud.MagicStoneLabel.width  = 60;
        this._characterHud.MagicStoneLabel.height = 52;
        this._parameterHud.SpeedLabel.SetAnchor((Transform)null);
        this._parameterHud.StrengthLabel.SetAnchor((Transform)null);
        this._parameterHud.MagicLabel.SetAnchor((Transform)null);
        this._parameterHud.SpiritLabel.SetAnchor((Transform)null);
        this._parameterHud.AttackLabel.SetAnchor((Transform)null);
        this._parameterHud.DefendLabel.SetAnchor((Transform)null);
        this._parameterHud.EvadeLabel.SetAnchor((Transform)null);
        this._parameterHud.MagicDefLabel.SetAnchor((Transform)null);
        this._parameterHud.MagicEvaLabel.SetAnchor((Transform)null);

        // Update 27.02.2017
        this._parameterHud.SpeedLabel.width     = 90;
        this._parameterHud.StrengthLabel.width  = 90;
        this._parameterHud.MagicLabel.width     = 90;
        this._parameterHud.SpiritLabel.width    = 90;
        this._parameterHud.AttackLabel.width    = 90;
        this._parameterHud.DefendLabel.width    = 90;
        this._parameterHud.EvadeLabel.width     = 90;
        this._parameterHud.MagicDefLabel.width  = 90;
        this._parameterHud.MagicEvaLabel.width  = 90;
        this._parameterHud.SpeedLabel.height    = 40;
        this._parameterHud.StrengthLabel.height = 40;
        this._parameterHud.MagicLabel.height    = 40;
        this._parameterHud.SpiritLabel.height   = 40;
        this._parameterHud.AttackLabel.height   = 40;
        this._parameterHud.DefendLabel.height   = 40;
        this._parameterHud.EvadeLabel.height    = 40;
        this._parameterHud.MagicDefLabel.height = 40;
        this._parameterHud.MagicEvaLabel.height = 40;
    }
コード例 #3
0
    protected void Awake()
    {
        base.FadingComponent = this.ScreenFadeGameObject.GetComponent <HonoFading>();
        this.ItemSubMenu     = this.SubMenuPanel.GetChild(0).GetChild(0).GetChild(0);
        this.AbilitySubMenu  = this.SubMenuPanel.GetChild(0).GetChild(0).GetChild(1);
        this.EquipSubMenu    = this.SubMenuPanel.GetChild(0).GetChild(0).GetChild(2);
        this.StatusSubMenu   = this.SubMenuPanel.GetChild(0).GetChild(0).GetChild(3);
        this.OrderSubMenu    = this.SubMenuPanel.GetChild(0).GetChild(0).GetChild(4);
        this.CardSubMenu     = this.SubMenuPanel.GetChild(0).GetChild(0).GetChild(5);
        this.ConfigSubMenu   = this.SubMenuPanel.GetChild(0).GetChild(0).GetChild(6);

        UIEventListener.Get(this.ItemSubMenu).Click    += onClick;
        UIEventListener.Get(this.AbilitySubMenu).Click += onClick;
        UIEventListener.Get(this.EquipSubMenu).Click   += onClick;
        UIEventListener.Get(this.StatusSubMenu).Click  += onClick;
        UIEventListener.Get(this.OrderSubMenu).Click   += onClick;
        UIEventListener.Get(this.CardSubMenu).Click    += onClick;
        UIEventListener.Get(this.ConfigSubMenu).Click  += onClick;

        foreach (Transform tr in this.CharacterListPanel.transform)
        {
            GameObject go = tr.gameObject;
            UIEventListener.Get(go).Click += onClick;

            CharacterDetailHUD item = new CharacterDetailHUD(go, false);
            this.CharacterHUDList.Add(item);

            GameObject child = go.GetChild(1);
            UIEventListener.Get(child).Click += onClick;

            this.CharacterOrderGameObjectList.Add(child);
            if (FF9StateSystem.MobilePlatform)
            {
                go.GetComponent <ButtonGroupState>().Help.TextKey = "TargetHelpMobile";
            }
        }

        this.gilLabel    = this.GenericInfoPanel.GetChild(1).GetChild(1).GetComponent <UILabel>();
        this.hourLabel   = this.GenericInfoPanel.GetChild(0).GetChild(1).GetComponent <UILabel>();
        this.minuteLabel = this.GenericInfoPanel.GetChild(0).GetChild(3).GetComponent <UILabel>();
        this.secondLabel = this.GenericInfoPanel.GetChild(0).GetChild(5).GetComponent <UILabel>();
        this.colonLabel  = new UILabel[]
        {
            this.GenericInfoPanel.GetChild(0).GetChild(2).GetComponent <UILabel>(),
            this.GenericInfoPanel.GetChild(0).GetChild(4).GetComponent <UILabel>()
        };
        this.locationNameLabel      = this.LocationInfoPanel.GetChild(0).GetComponent <UILabel>();
        this.characterTransition    = this.TransitionGroup.GetChild(0).GetComponent <HonoTweenPosition>();
        this.submenuTransition      = this.SubMenuTransitionGameObject.GetComponent <HonoTweenClipping>();
        this.screenFadePanel        = this.ScreenFadeGameObject.GetParent().GetComponent <UIPanel>();
        this.characterMemorize      = this.CharacterHUDList[this.GetFirstPlayer()].Self;
        this.characterOrderMemorize = this.CharacterHUDList[0].Self;
    }
コード例 #4
0
    private void SetAvalableCharacter(Boolean includeEmpty)
    {
        List <CharacterDetailHUD> characterDetailHudList = new List <CharacterDetailHUD>();

        if (!includeEmpty)
        {
            using (List <CharacterDetailHUD> .Enumerator enumerator = _targetHudList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    CharacterDetailHUD current = enumerator.Current;
                    if (current.Content.activeSelf)
                    {
                        characterDetailHudList.Add(current);
                        ButtonGroupState.SetButtonEnable(current.Self, true);
                    }
                    else
                    {
                        ButtonGroupState.SetButtonEnable(current.Self, false);
                    }
                }
            }
        }
        else
        {
            using (List <CharacterDetailHUD> .Enumerator enumerator = _targetHudList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    CharacterDetailHUD current = enumerator.Current;
                    characterDetailHudList.Add(current);
                    ButtonGroupState.SetButtonEnable(current.Self, true);
                }
            }
        }
        for (Int32 index1 = 0; index1 < characterDetailHudList.Count; ++index1)
        {
            Int32 index2 = index1 - 1;
            Int32 index3 = index1 + 1;
            if (index1 == 0)
            {
                index2 = characterDetailHudList.Count - 1;
            }
            if (index1 == characterDetailHudList.Count - 1)
            {
                index3 = 0;
            }
            UIKeyNavigation component = characterDetailHudList[index1].Self.GetComponent <UIKeyNavigation>();
            component.onUp   = characterDetailHudList[index2].Self;
            component.onDown = characterDetailHudList[index3].Self;
        }
    }
コード例 #5
0
    private void DisplayTarget()
    {
        Int32 num = 0;

        foreach (PLAYER player in FF9StateSystem.Common.FF9.party.member)
        {
            CharacterDetailHUD targetHud = _targetHudList[num++];
            targetHud.Self.SetActive(true);
            if (player != null)
            {
                targetHud.Content.SetActive(true);
                FF9UIDataTool.DisplayCharacterDetail(player, targetHud);
                FF9UIDataTool.DisplayCharacterAvatar(player, new Vector2(), new Vector2(), targetHud.AvatarSprite, false);
                switch (ff9item._FF9Item_Info[_itemIdList[_currentItemIndex] - 224].info.DisplayStats)
                {
                case TargetDisplay.None:
                case TargetDisplay.Hp:
                case TargetDisplay.Mp:
                    targetHud.HPPanel.SetActive(true);
                    targetHud.MPPanel.SetActive(true);
                    targetHud.StatusesPanel.SetActive(false);
                    continue;

                case TargetDisplay.Debuffs:
                case TargetDisplay.Buffs:
                    targetHud.HPPanel.SetActive(false);
                    targetHud.MPPanel.SetActive(false);
                    targetHud.StatusesPanel.SetActive(true);
                    continue;

                default:
                    continue;
                }
            }
            else
            {
                targetHud.Content.SetActive(false);
            }
        }
        SetAvalableCharacter(false);
    }
コード例 #6
0
    private void DisplayCharacter()
    {
        Int32 num = 0;

        PLAYER[] member = FF9StateSystem.Common.FF9.party.member;
        for (Int32 i = 0; i < (Int32)member.Length; i++)
        {
            PLAYER             player             = member[i];
            CharacterDetailHUD characterDetailHUD = this.CharacterHUDList[num++];
            characterDetailHUD.Self.SetActive(true);
            if (player != null)
            {
                characterDetailHUD.Content.SetActive(true);
                FF9UIDataTool.DisplayCharacterDetail(player, characterDetailHUD);
                FF9UIDataTool.DisplayCharacterAvatar(player, this.FrontRowPosition, this.BackRowPosition, characterDetailHUD.AvatarSprite, true);
            }
            else
            {
                characterDetailHUD.Content.SetActive(false);
            }
        }
    }