Пример #1
0
 public stFriendIntimacy(ulong ullUid, uint dwLogicWorldID, uint dwLastIntimacyTime, ushort wIntimacyValue)
 {
     this.ullUid             = ullUid;
     this.dwLogicWorldID     = dwLogicWorldID;
     this.dwLastIntimacyTime = dwLastIntimacyTime;
     this.wIntimacyValue     = wIntimacyValue;
     this.bFreeze            = UT.IsFreeze(dwLastIntimacyTime);
     this.type = Singleton <CFriendContoller> .instance.model.CalcType(wIntimacyValue);
 }
Пример #2
0
 public void ShowIntimacyNum(int value, CFriendModel.EIntimacyType type, bool bFreeze)
 {
     if (IntimacyNumMax == 0)
     {
         IntimacyNumMax = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)0xc3).dwConfValue;
     }
     if (this.intimacyNum != null)
     {
         if (value >= IntimacyNumMax)
         {
             this.intimacyNum.text = "Max";
         }
         else
         {
             this.intimacyNum.text = value.ToString();
         }
     }
     if (bFreeze)
     {
         if (this.freeze != null)
         {
             this.freeze.CustomSetActive(true);
         }
         this.intimacyNum.color = CUIUtility.Intimacy_Freeze;
     }
     else
     {
         if (this.freeze != null)
         {
             this.freeze.CustomSetActive(false);
         }
         if (type == CFriendModel.EIntimacyType.Low)
         {
             if (this.full != null)
             {
                 this.full.CustomSetActive(false);
             }
             if (this.high != null)
             {
                 this.high.CustomSetActive(false);
             }
             if (this.mid != null)
             {
                 this.mid.CustomSetActive(false);
             }
             if (this.low != null)
             {
                 this.low.CustomSetActive(true);
             }
             this.intimacyNum.color = CUIUtility.Intimacy_Low;
         }
         else if (type == CFriendModel.EIntimacyType.Middle)
         {
             if (this.full != null)
             {
                 this.full.CustomSetActive(false);
             }
             if (this.high != null)
             {
                 this.high.CustomSetActive(false);
             }
             if (this.mid != null)
             {
                 this.mid.CustomSetActive(true);
             }
             if (this.low != null)
             {
                 this.low.CustomSetActive(false);
             }
             this.intimacyNum.color = CUIUtility.Intimacy_Mid;
         }
         else if (type == CFriendModel.EIntimacyType.High)
         {
             if (this.full != null)
             {
                 this.full.CustomSetActive(false);
             }
             if (this.high != null)
             {
                 this.high.CustomSetActive(true);
             }
             if (this.mid != null)
             {
                 this.mid.CustomSetActive(false);
             }
             if (this.low != null)
             {
                 this.low.CustomSetActive(false);
             }
             this.intimacyNum.color = CUIUtility.Intimacy_High;
         }
         else if (type == CFriendModel.EIntimacyType.full)
         {
             if (this.full != null)
             {
                 this.full.CustomSetActive(true);
             }
             if (this.high != null)
             {
                 this.high.CustomSetActive(false);
             }
             if (this.mid != null)
             {
                 this.mid.CustomSetActive(false);
             }
             if (this.low != null)
             {
                 this.low.CustomSetActive(false);
             }
             this.intimacyNum.color = CUIUtility.Intimacy_Full;
         }
     }
 }
Пример #3
0
        public void ShowIntimacyNum(int value, CFriendModel.EIntimacyType type, bool bFreeze, COM_INTIMACY_STATE state)
        {
            GameObject gameObject = this.full.transform.parent.FindChild("rela").gameObject;

            if (state == 1 || state == 2 || state == 21 || state == 23)
            {
                this.intimacyNum.gameObject.CustomSetActive(false);
                this.freeze.CustomSetActive(false);
                this.full.CustomSetActive(false);
                this.high.CustomSetActive(false);
                this.mid.CustomSetActive(false);
                this.low.CustomSetActive(false);
                gameObject.CustomSetActive(true);
                if (state == 1 || state == 21)
                {
                    Utility.FindChild(gameObject, "jiyou").gameObject.CustomSetActive(true);
                    Utility.FindChild(gameObject, "lianren").gameObject.CustomSetActive(false);
                    Text componetInChild = Utility.GetComponetInChild <Text>(gameObject, "txt");
                    if (componetInChild != null)
                    {
                        componetInChild.gameObject.CustomSetActive(true);
                        componetInChild.text = UT.FRData().IntimRela_TypeColor_Gay;
                    }
                }
                else if (state == 2 || state == 23)
                {
                    Utility.FindChild(gameObject, "jiyou").gameObject.CustomSetActive(false);
                    Utility.FindChild(gameObject, "lianren").gameObject.CustomSetActive(true);
                    Text componetInChild2 = Utility.GetComponetInChild <Text>(gameObject, "txt");
                    if (componetInChild2 != null)
                    {
                        componetInChild2.gameObject.CustomSetActive(true);
                        componetInChild2.text = UT.FRData().IntimRela_TypeColor_Lover;
                    }
                }
                return;
            }
            gameObject.CustomSetActive(false);
            if (this.intimacyNum != null)
            {
                this.intimacyNum.gameObject.CustomSetActive(true);
                if ((long)value >= (long)((ulong)Singleton <CFriendContoller> .get_instance().model.GetMaxIntimacyNum()))
                {
                    this.intimacyNum.text = "Max";
                }
                else
                {
                    this.intimacyNum.text = value.ToString();
                }
            }
            if (bFreeze)
            {
                this.freeze.CustomSetActive(true);
                this.intimacyNum.color = CUIUtility.Intimacy_Freeze;
            }
            else
            {
                if (this.freeze != null)
                {
                    this.freeze.CustomSetActive(false);
                }
                if (type == CFriendModel.EIntimacyType.Low)
                {
                    if (this.full != null)
                    {
                        this.full.CustomSetActive(false);
                    }
                    if (this.high != null)
                    {
                        this.high.CustomSetActive(false);
                    }
                    if (this.mid != null)
                    {
                        this.mid.CustomSetActive(false);
                    }
                    if (this.low != null)
                    {
                        this.low.CustomSetActive(true);
                    }
                    this.intimacyNum.color = CUIUtility.Intimacy_Low;
                }
                else if (type == CFriendModel.EIntimacyType.Middle)
                {
                    if (this.full != null)
                    {
                        this.full.CustomSetActive(false);
                    }
                    if (this.high != null)
                    {
                        this.high.CustomSetActive(false);
                    }
                    if (this.mid != null)
                    {
                        this.mid.CustomSetActive(true);
                    }
                    if (this.low != null)
                    {
                        this.low.CustomSetActive(false);
                    }
                    this.intimacyNum.color = CUIUtility.Intimacy_Mid;
                }
                else if (type == CFriendModel.EIntimacyType.High)
                {
                    if (this.full != null)
                    {
                        this.full.CustomSetActive(false);
                    }
                    if (this.high != null)
                    {
                        this.high.CustomSetActive(true);
                    }
                    if (this.mid != null)
                    {
                        this.mid.CustomSetActive(false);
                    }
                    if (this.low != null)
                    {
                        this.low.CustomSetActive(false);
                    }
                    this.intimacyNum.color = CUIUtility.Intimacy_High;
                }
                else if (type == CFriendModel.EIntimacyType.full)
                {
                    if (this.full != null)
                    {
                        this.full.CustomSetActive(true);
                    }
                    if (this.high != null)
                    {
                        this.high.CustomSetActive(false);
                    }
                    if (this.mid != null)
                    {
                        this.mid.CustomSetActive(false);
                    }
                    if (this.low != null)
                    {
                        this.low.CustomSetActive(false);
                    }
                    this.intimacyNum.color = CUIUtility.Intimacy_Full;
                }
            }
        }
Пример #4
0
        public void ShowIntimacyNum(int value, CFriendModel.EIntimacyType type, bool bFreeze, COM_INTIMACY_STATE state)
        {
            GameObject gameObject = this.full.transform.parent.FindChild("rela").gameObject;
            bool       flag       = IntimacyRelationViewUT.IsRelaState(state);
            bool       flag2      = IntimacyRelationViewUT.IsRelaStateDeny(state);

            if (flag || flag2)
            {
                this.intimacyNum.gameObject.CustomSetActive(false);
                this.freeze.CustomSetActive(false);
                this.full.CustomSetActive(false);
                this.high.CustomSetActive(false);
                this.mid.CustomSetActive(false);
                this.low.CustomSetActive(false);
                gameObject.CustomSetActive(true);
                COM_INTIMACY_STATE cOM_INTIMACY_STATE = flag2 ? IntimacyRelationViewUT.GetStateByDenyState(state) : state;
                if (cOM_INTIMACY_STATE != COM_INTIMACY_STATE.COM_INTIMACY_STATE_NULL)
                {
                    string relaIcon = IntimacyRelationViewUT.GetRelaIcon(value, cOM_INTIMACY_STATE);
                    if (!string.IsNullOrEmpty(relaIcon))
                    {
                        Image componetInChild = Utility.GetComponetInChild <Image>(gameObject, "icon");
                        if (componetInChild != null)
                        {
                            componetInChild.gameObject.CustomSetActive(true);
                            componetInChild.SetSprite(relaIcon, this.formScript, true, false, false, false);
                        }
                    }
                    Text componetInChild2 = Utility.GetComponetInChild <Text>(gameObject, "txt");
                    if (componetInChild2 != null)
                    {
                        componetInChild2.gameObject.CustomSetActive(true);
                        componetInChild2.set_text(Singleton <CFriendContoller> .instance.model.GetPrefixString(value, state));
                    }
                }
            }
            else
            {
                gameObject.CustomSetActive(false);
                if (this.intimacyNum != null)
                {
                    this.intimacyNum.gameObject.CustomSetActive(true);
                    if ((long)value >= (long)((ulong)Singleton <CFriendContoller> .instance.model.GetIntimacyMaxValue()))
                    {
                        this.intimacyNum.set_text("Max");
                    }
                    else
                    {
                        this.intimacyNum.set_text(value.ToString());
                    }
                }
                if (bFreeze)
                {
                    this.freeze.CustomSetActive(true);
                    this.intimacyNum.set_color(CUIUtility.Intimacy_Freeze);
                }
                else
                {
                    this.freeze.CustomSetActive(false);
                    if (type == CFriendModel.EIntimacyType.Low)
                    {
                        this.full.CustomSetActive(false);
                        this.high.CustomSetActive(false);
                        this.mid.CustomSetActive(false);
                        this.low.CustomSetActive(true);
                        this.intimacyNum.set_color(CUIUtility.Intimacy_Low);
                    }
                    else if (type == CFriendModel.EIntimacyType.Middle)
                    {
                        this.full.CustomSetActive(false);
                        this.high.CustomSetActive(false);
                        this.mid.CustomSetActive(true);
                        this.low.CustomSetActive(false);
                        this.intimacyNum.set_color(CUIUtility.Intimacy_Mid);
                    }
                    else if (type == CFriendModel.EIntimacyType.High)
                    {
                        this.full.CustomSetActive(false);
                        this.high.CustomSetActive(true);
                        this.mid.CustomSetActive(false);
                        this.low.CustomSetActive(false);
                        this.intimacyNum.set_color(CUIUtility.Intimacy_High);
                    }
                    else if (type == CFriendModel.EIntimacyType.full)
                    {
                        this.full.CustomSetActive(true);
                        this.high.CustomSetActive(false);
                        this.mid.CustomSetActive(false);
                        this.low.CustomSetActive(false);
                        this.intimacyNum.set_color(CUIUtility.Intimacy_Full);
                    }
                }
            }
        }