예제 #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);
    }