Exemple #1
0
    void onClick_Btnhead_Btn(GameObject caster)
    {
        BShowEnemyList = !BShowEnemyList;
        Client.IEntity entity = ClientGlobal.Instance().GetControllerSystem().GetActiveCtrl().GetCurTarget();
        if (entity != null)
        {
            if (entity.GetEntityType() == EntityType.EntityType_Player)
            {
                DataManager.Instance.Sender.RequestPlayerInfoForOprate(entity.GetID(), PlayerOpreatePanel.ViewType.Normal);
            }
            else if (entity.GetEntityType() == EntityType.EntityTYpe_Robot)
            {
                ShowRobotOpreate((uint)entity.GetID(), (uint)entity.GetProp((int)RobotProp.Job),
                                 (uint)entity.GetProp((int)CreatureProp.Level), entity.GetName(), (uint)entity.GetProp((int)RobotProp.Sex));
            }
            else
            {
            }
        }

        if (BShowEnemyList)
        {
            if (entity != null)
            {
                NetService.Instance.Send(new GameCmd.stEnmityDataUserCmd_CS()
                {
                    npcid = entity.GetID()
                });
            }
        }
        else
        {
            m_transHateList.gameObject.SetActive(false);
        }
    }