Пример #1
0
 public void ShowAltarHead(int type, Ientity entity)
 {
     if (entity == null || entity.realObject == null || entity.RealEntity == null)
         return;
     if (!entity.IsSameCamp(PlayerManager.Instance.LocalPlayer.EntityCamp))
         return;
     AltarInHead head = GetAsignedAltarHead(entity);
     if (head == null)
         return;
     head.CreateHead(type);
     //UIAltarInHead.Instance.SetCurrHeadIcon (type,entity.realObject.transform);
 }
Пример #2
0
        public UIAltarInHead CreateAltarUIPrefab(AltarInHead target, int type)
        {
            GameObject obj = GameObject.Instantiate(Resources.Load(GameConstDefine.pathAltarHead)) as GameObject;

            obj.gameObject.transform.parent = mAltarSoldierHeadPoint;
            obj.transform.localScale        = Vector3.one;
            obj.transform.localPosition     = Vector3.zero;

            UIAltarInHead altar = obj.GetComponent <UIAltarInHead>();

            altar.SetCurrHeadIcon(type, target.transform);
            return(altar);
        }
Пример #3
0
 public void DelAltarHead(int entityID, int type)
 {
     MapObjConfigInfo configInfp = ConfigReader.MapObjXmlInfoDict[entityID];
     if (configInfp == null)
         return;
     AltarInHead head = GetAsignedAltarHead(entityID);
     if (head == null)
     {
         Debug.LogError("error:" + head.name);
         return;
     }
     head.DelHead();
 }
Пример #4
0
    public void ShowAltarHead(int entityID,int type)
    {
        MapObjConfigInfo configInfp = ConfigReader.MapObjXmlInfoDict[entityID];
        if (configInfp == null)
            return;
        //int index = configInfp.un32ObjIdx;
        //int camp = configInfp.n32Camp;
        //UInt64 sGUID = CTools.MakeGUID((Common.GameData.EObjectType)type, (ulong)index);
        AltarInHead head = GetAsignedAltarHead(entityID);

        if (head == null)
        {
            Debug.LogError("AltarHead error:" + entityID);
            return;
        }
        head.CreateHead(type);
    }