Esempio n. 1
0
        private void UpdatePlayerInfo()
        {
            Entity playerEntity = ECSLocate.Player.GetPlayerEntity();

            if (playerEntity == null)
            {
                return;
            }
            GameObjectCom goCom = playerEntity.GetCom <GameObjectCom>();

            info.Pos = goCom.Tran.position;
        }
Esempio n. 2
0
 protected override void HandleComs(List <BaseCom> comList)
 {
     if (effectCom == null)
     {
         effectCom = GetCom <EffectCom>(comList[0]);
     }
     if (goCom == null)
     {
         goCom = GetCom <GameObjectCom>(comList[1]);
     }
     HandleEffect(effectCom);
     RecycleEffect(effectCom);
 }
Esempio n. 3
0
        public void HandleNormalEffect(EffectCom effectCom)
        {
            Entity        entity     = LCECS.ECSLocate.ECS.GetEntity(effectCom.EntityId);
            GameObjectCom goCom      = entity.GetCom <GameObjectCom>();
            Transform     entityTran = goCom.Tran;

            //获得特效节点
            EffectInfo info     = null;
            EffectGo   effectGo = GetEffectGo(effectCom, effectCom.CurrShowEffectId, ref info);

            //设置位置
            effectGo.Go.transform.position = entityTran.position + effectCom.ShowPos;
            effectGo.Go.SetActive(true);
        }
Esempio n. 4
0
        protected override void HandleComs(List <BaseCom> comList)
        {
            if (MapCom == null)
            {
                MapCom = GetCom <MapCom>(comList[0]);
            }
            if (GoCom == null)
            {
                GoCom = GetCom <GameObjectCom>(comList[1]);
            }
            PlayerInfoData playerInfo = ECSLayerLocate.Info.GetWorldInfo <PlayerInfoData>(WorldInfoKey.PlayerInfo);

            RefreshMap(playerInfo.Pos);
            UpdatePlayerMapPos(playerInfo.Pos);
        }
Esempio n. 5
0
        private void HandleDashEffect(EffectCom effectCom)
        {
            Entity        entity     = LCECS.ECSLocate.ECS.GetEntity(effectCom.EntityId);
            GameObjectCom goCom      = entity.GetCom <GameObjectCom>();
            Transform     entityTran = goCom.Tran;

            //获得特效节点
            EffectInfo info     = null;
            EffectGo   effectGo = GetEffectGo(effectCom, effectCom.CurrShowEffectId, ref info);

            //动画队列
            Sequence s = DOTween.Sequence();

            for (int i = 0; i < effectGo.Go.transform.childCount; i++)
            {
                Transform dashGo = effectGo.Go.transform.GetChild(i);
                dashGo.gameObject.SetActive(false);
                s.AppendCallback(() => InitDashGo(entityTran, dashGo, i));
                //间隔后,才赋值位置
                s.AppendInterval(info.IntervalTime);
            }
        }