コード例 #1
0
    public void ShowGuildTitle(long uuid, bool isShow)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        HeadInfoUnit uI = this.GetUI(uuid);

        this.ShowGuildTitle(uuid, isShow, data, uI);
    }
コード例 #2
0
    public void AddHeadInfo(int actorType, Transform actorRoot, float height, long uuid, bool avc_control, bool isShowOfLogic)
    {
        if (!SystemConfig.IsBillboardOn)
        {
            return;
        }
        if (EntityWorld.Instance.EntSelf == null)
        {
            return;
        }
        this.RemoveHeadInfo(uuid);
        if (this.IsNoHeadInfoType(actorType))
        {
            return;
        }
        if (uuid == EntityWorld.Instance.EntSelf.ID)
        {
            this.SelfHeadInfoPosition = null;
        }
        HeadInfoManager.HeadInfoData headInfoData = this.AddData(uuid, avc_control);
        headInfoData.uuid          = uuid;
        headInfoData.actorType     = actorType;
        headInfoData.isShowOfLogic = isShowOfLogic;
        HeadInfoUnit headInfoUnit = this.AddUI(actorRoot, height, uuid);

        headInfoUnit.actorType = actorType;
        this.AddControl(actorRoot, height, uuid, headInfoUnit.get_transform(), actorType, avc_control);
    }
コード例 #3
0
    public void ShowBloodBarByScene(long uuid, bool isShow)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        HeadInfoUnit uI = this.GetUI(uuid);

        this.ShowBloodBarByScene(uuid, isShow, data, uI);
    }
コード例 #4
0
    public void ShowCommonIcon(long uuid, bool isShow)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        HeadInfoUnit uI = this.GetUI(uuid);

        this.ShowCommonIcon(uuid, isShow, data, uI);
    }
コード例 #5
0
 public bool IsControlOn(long uuid)
 {
     if (uuid > 0L)
     {
         HeadInfoManager.HeadInfoData data = this.GetData(uuid);
         return(data != null && (data.isShowName || data.ShowBloodBar(true) || data.isShowTitle) && (data.isShowOfLogic && data.isShowOfAVC));
     }
     return(false);
 }
コード例 #6
0
 private HeadInfoManager.HeadInfoData AddData(long uuid, bool avc_control)
 {
     HeadInfoManager.HeadInfoData headInfoData = new HeadInfoManager.HeadInfoData();
     headInfoData.uuid = uuid;
     if (EntityWorld.Instance.EntSelf != null && !EntityWorld.Instance.EntSelf.IsInBattle && uuid != EntityWorld.Instance.EntSelf.ID)
     {
         headInfoData.isShowOfAVC = ActorVisibleManager.Instance.IsShow(uuid);
     }
     this.m_datas.Add(headInfoData);
     return(headInfoData);
 }
コード例 #7
0
 public void ShowName(long uuid, bool isShow, HeadInfoManager.HeadInfoData data, HeadInfoUnit ui)
 {
     if (data == null)
     {
         return;
     }
     data.isShowName = isShow;
     if (ui != null)
     {
         ui.ShowName(data.Show(data.isShowName));
     }
 }
コード例 #8
0
 public HeadInfoManager.HeadInfoData GetData(long uuid)
 {
     for (int i = 0; i < this.m_datas.get_Count(); i++)
     {
         HeadInfoManager.HeadInfoData headInfoData = this.m_datas.get_Item(i);
         if (headInfoData.uuid == uuid)
         {
             return(headInfoData);
         }
     }
     return(null);
 }
コード例 #9
0
 public void ShowBloodBarByScene(long uuid, bool isShow, HeadInfoManager.HeadInfoData data, HeadInfoUnit ui)
 {
     if (data == null)
     {
         return;
     }
     data.isBloodBarScene = isShow;
     if (ui != null)
     {
         ui.SetAndShowBloodBar(data.ShowBloodBar(false), data.bloodBarType);
     }
 }
コード例 #10
0
 public void ShowGuildTitle(long uuid, bool isShow, HeadInfoManager.HeadInfoData data, HeadInfoUnit ui)
 {
     if (data == null)
     {
         return;
     }
     data.isShowGuildTitle = isShow;
     if (ui != null)
     {
         ui.SetAndShowGuildTitle(data.Show(data.isShowGuildTitle), data.guildTitle);
     }
 }
コード例 #11
0
 public void ShowCommonIcon(long uuid, bool isShow, HeadInfoManager.HeadInfoData data, HeadInfoUnit ui)
 {
     if (data == null)
     {
         return;
     }
     data.isShowCommonIcon = isShow;
     if (ui != null)
     {
         ui.SetAndShowCommonIcon(data.Show(data.isShowCommonIcon), data.commonIcon);
     }
 }
コード例 #12
0
    private void ResortOfZ2D()
    {
        if (CamerasMgr.CameraMain == null || !CamerasMgr.CameraMain.get_enabled())
        {
            return;
        }
        if (CamerasMgr.CameraUI == null || !CamerasMgr.CameraUI.get_enabled())
        {
            return;
        }
        if (this.m_controls.get_Count() <= 1)
        {
            return;
        }
        Utils.RemoveNull <HeadInfoControl>(this.m_controls);
        this.m_controls.Sort((HeadInfoControl a, HeadInfoControl b) => CamerasMgr.CameraUI.ScreenToViewportPoint(CamerasMgr.CameraMain.WorldToScreenPoint(b.get_transform().get_position())).z.CompareTo(CamerasMgr.CameraUI.ScreenToViewportPoint(CamerasMgr.CameraMain.WorldToScreenPoint(a.get_transform().get_position())).z));
        HeadInfoManager.IsUpdateLockOn = true;
        int num = 0;

        while (num < this.m_controls.get_Count() && num < this.m_uis.get_Count())
        {
            HeadInfoControl headInfoControl   = this.m_controls.get_Item(num);
            HeadInfoUnit    headInfoUnit      = this.m_uis.get_Item(num);
            HeadInfoManager.HeadInfoData data = this.GetData(headInfoControl.uuid);
            if (data != null)
            {
                if (headInfoControl != null && headInfoUnit != null)
                {
                    headInfoUnit.uuid            = data.uuid;
                    headInfoUnit.actorType       = data.actorType;
                    headInfoControl.m_headInfoUI = headInfoUnit.get_transform();
                    headInfoControl.m_actorType  = data.actorType;
                    HeadInfoControl control = this.GetControl(data.uuid);
                    if (control != null)
                    {
                        control.UpdatePos();
                    }
                }
            }
            num++;
        }
        HeadInfoManager.IsUpdateLockOn = false;
        for (int i = 0; i < this.m_uis.get_Count(); i++)
        {
            HeadInfoUnit headInfoUnit2 = this.m_uis.get_Item(i);
            if (headInfoUnit2 != null)
            {
                headInfoUnit2.RefreshAll();
            }
        }
    }
コード例 #13
0
    public void SetCommonIcon(long uuid, int iconId)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        data.commonIcon = iconId;
        HeadInfoUnit uI = this.GetUI(uuid);

        if (uI != null)
        {
            uI.SetAndShowCommonIcon(data.Show(data.isShowCommonIcon), iconId);
        }
    }
コード例 #14
0
    public void SetGuildTitle(long uuid, string guildTitle)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        data.guildTitle = guildTitle;
        HeadInfoUnit uI = this.GetUI(uuid);

        if (uI != null)
        {
            uI.SetAndShowGuildTitle(data.Show(data.isShowGuildTitle), guildTitle);
        }
    }
コード例 #15
0
    public void SetTitle(long uuid, int titleId)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        data.titleId = titleId;
        HeadInfoUnit uI = this.GetUI(uuid);

        if (uI != null)
        {
            uI.SetAndShowTitle(data.Show(data.isShowTitle), titleId);
        }
    }
コード例 #16
0
    public void SetBloodBarSize(long uuid, List <int> bloodBarSize)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        data.bloodBarSize = bloodBarSize;
        HeadInfoUnit uI = this.GetUI(uuid);

        if (uI != null)
        {
            uI.SetBloodBarSize(bloodBarSize);
        }
    }
コード例 #17
0
    public void SetBloodBarType(long uuid, int type)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        data.bloodBarType = type;
        HeadInfoUnit uI = this.GetUI(uuid);

        if (uI != null)
        {
            uI.SetAndShowBloodBar(data.ShowBloodBar(false), data.bloodBarType);
        }
    }
コード例 #18
0
    public void ShowBloodBarByOff(long uuid, bool isShow)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        data.isBloodBarOff = isShow;
        HeadInfoUnit uI = this.GetUI(uuid);

        if (uI != null)
        {
            uI.SetAndShowBloodBar(data.ShowBloodBar(false), data.bloodBarType);
        }
    }
コード例 #19
0
    private void SetNameFollowCache(int actorType, long uuid, string name)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        data.name = name;
        HeadInfoUnit uI = this.GetUI(uuid);

        if (uI != null)
        {
            uI.SetName(name);
        }
    }
コード例 #20
0
    public void show_control_normal(long uuid, bool isShow)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        if (data.isShowOfDistance == isShow)
        {
            return;
        }
        data.isShowOfDistance = isShow;
        HeadInfoUnit uI = this.GetUI(uuid);

        this.UpdateShow(data, uI);
    }
コード例 #21
0
    public void show_control_actorvisible(long uuid, bool isShow)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        if (data.isShowOfAVC == isShow)
        {
            return;
        }
        data.isShowOfAVC = isShow;
        HeadInfoUnit uI = this.GetUI(uuid);

        this.UpdateShow(data, uI);
    }
コード例 #22
0
 public void RefreshAll()
 {
     HeadInfoManager.HeadInfoData data = HeadInfoManager.Instance.GetData(this.uuid);
     if (data == null)
     {
         return;
     }
     this.ShowName(data.Show(data.isShowName));
     this.SetAndShowTitle(data.Show(data.isShowTitle), data.titleId);
     this.SetAndShowGuildTitle(data.Show(data.isShowGuildTitle), data.guildTitle);
     this.SetAndShowCommonIcon(data.Show(data.isShowCommonIcon), data.commonIcon);
     this.SetAndShowBloodBar(data.ShowBloodBar(false), data.bloodBarType);
     this.SetName(data.name);
     this.SetBloodBar(data.bloodFillAmount);
     this.SetBloodBarSize(data.bloodBarSize);
 }
コード例 #23
0
    public void SetBloodBar(long uuid, float fillAmount, bool isLogicShow = true)
    {
        HeadInfoManager.HeadInfoData data = this.GetData(uuid);
        if (data == null)
        {
            return;
        }
        data.isBloodBarOff2  = isLogicShow;
        data.bloodFillAmount = fillAmount;
        HeadInfoUnit uI = this.GetUI(uuid);

        if (uI != null)
        {
            uI.SetBloodBar(fillAmount);
            uI.SetAndShowBloodBar(data.ShowBloodBar(false), data.bloodBarType);
        }
    }
コード例 #24
0
    private void UpdateShow(HeadInfoManager.HeadInfoData data, HeadInfoUnit ui)
    {
        if (data == null || ui == null)
        {
            return;
        }
        ui.ShowName(data.Show(data.isShowName));
        ui.SetAndShowTitle(data.Show(data.isShowTitle), data.titleId);
        ui.SetAndShowGuildTitle(data.Show(data.isShowGuildTitle), data.guildTitle);
        ui.ShowCommonIcon(data.Show(data.isShowCommonIcon), data.commonIcon);
        ui.SetAndShowBloodBar(data.ShowBloodBar(false), data.bloodBarType);
        HeadInfoControl control = this.GetControl(data.uuid);

        if (control != null)
        {
            control.UpdatePos();
        }
    }
コード例 #25
0
    private void ShowAsMainScene()
    {
        HeadInfo headInfo = DataReader <HeadInfo> .Get(this.actorType);

        if (headInfo != null && headInfo.MainScene.get_Count() >= 5)
        {
            HeadInfoManager.HeadInfoData data = HeadInfoManager.Instance.GetData(this.uuid);
            HeadInfoManager.Instance.ShowName(this.uuid, headInfo.MainScene.get_Item(0) == 1, data, this);
            HeadInfoManager.Instance.ShowTitle(this.uuid, headInfo.MainScene.get_Item(1) == 1, data, this);
            HeadInfoManager.Instance.ShowBloodBarByScene(this.uuid, headInfo.MainScene.get_Item(2) == 1, data, this);
            HeadInfoManager.Instance.ShowGuildTitle(this.uuid, headInfo.MainScene.get_Item(3) == 1, data, this);
            HeadInfoManager.Instance.ShowCommonIcon(this.uuid, headInfo.MainScene.get_Item(4) == 1, data, this);
        }
        else
        {
            this.HideAll(this.uuid);
        }
    }
コード例 #26
0
 public void RemoveHeadInfo(long uuid)
 {
     for (int i = 0; i < this.m_datas.get_Count(); i++)
     {
         HeadInfoManager.HeadInfoData headInfoData = this.m_datas.get_Item(i);
         if (headInfoData.uuid == uuid)
         {
             this.m_datas.RemoveAt(i);
             break;
         }
     }
     for (int j = 0; j < this.m_uis.get_Count(); j++)
     {
         HeadInfoUnit headInfoUnit = this.m_uis.get_Item(j);
         if (!(headInfoUnit == null))
         {
             if (headInfoUnit.uuid == uuid)
             {
                 headInfoUnit.ResetAll();
                 HeadInfoManager.HeadInfoPool.ReUse(headInfoUnit.get_gameObject());
                 this.m_uis.RemoveAt(j);
                 break;
             }
         }
     }
     for (int k = 0; k < this.m_controls.get_Count(); k++)
     {
         HeadInfoControl headInfoControl = this.m_controls.get_Item(k);
         if (!(headInfoControl == null))
         {
             if (headInfoControl.uuid == uuid)
             {
                 headInfoControl.ResetAll();
                 this.m_controls.RemoveAt(k);
                 break;
             }
         }
     }
 }