public void ShowTargetFx(int changedInstId)
    {
        // 타겟이 변경 되었거나 내 캐릭터의 타겟 정보만 처리한다
        if (Owner.TargetID == changedInstId)
        {
            return;
        }

        // despawn Fx
        if (null != TargetingEffect)
        {
            SelfDespawn.ClearPartileSystem(TargetingEffect);
            G_GameInfo.EffectPool.Despawn(TargetingEffect, G_GameInfo.EffectPool.group);
            TargetingEffect = null;
        }

        Unit Target = null;

        if (!G_GameInfo.CharacterMgr.InvalidTarget(changedInstId, ref Target))
        {
            TargetingEffect = G_GameInfo.SpawnEffect("Fx_Targeting", 1f, Target.transform, Target.transform, Owner.Model.ScaleVec3);
            if (TargetingEffect.gameObject.layer != 0)
            {
                NGUITools.SetChildLayer(TargetingEffect, 0);
            }
        }
    }
예제 #2
0
    //float RunTime = 0;

    public override void OnEnter(System.Action callback)
    {
        base.OnEnter(callback);

        //< 내가 사용했던 모든 이펙트 삭제
        //parent.EffectClear();
        parent.PlayAnim(eAnimName.Anim_intro);
        parent.Animator.PlayAnimationSound(eAnimName.Anim_intro);
        string effName = parent.Animator.GetAnimationEffect(eAnimName.Anim_intro);

        if (!string.IsNullOrEmpty(effName))
        {
            G_GameInfo.SpawnEffect(effName, parent.cachedTransform.position, Quaternion.Euler(parent.cachedTransform.eulerAngles));
        }

        AniPlayTime = parent.Animator.GetAnimLength(eAnimName.Anim_intro);
    }
예제 #3
0
    public void FootEvent()
    {
        if (MyUnit == null)
        {
            return;
        }

        if (MyUnit.CurrentState != UnitState.Move)
        {
            return;
        }

        string effName = MyUnit.Animator.GetAnimationEffect(MyUnit.Animator.CurrentAnim);

        if (string.IsNullOrEmpty(effName))
        {
            effName = "Fx_pc_moving_effect";
        }

        if (!effName.Equals("0"))
        {
            if (TownState.TownActive)
            {
                uint soundID = MyUnit.Animator.GetAnimationSound(MyUnit.Animator.CurrentAnim);

                if (soundID != 0)
                {
                    SoundManager.instance.PlaySfxUnitSound(soundID, MyUnit._audioSource, MyUnit.cachedTransform, true);
                }

                TownState.SpawnEffect(effName, MyUnit.cachedTransform.position, Quaternion.Euler(Vector3.zero));
            }
            else
            {
                uint soundID = MyUnit.Animator.GetAnimationSound(MyUnit.Animator.CurrentAnim);

                if (soundID != 0)
                {
                    SoundManager.instance.PlaySfxUnitSound(soundID, MyUnit._audioSource, MyUnit.cachedTransform);
                }

                G_GameInfo.SpawnEffect(effName, MyUnit.cachedTransform.position, Quaternion.Euler(Vector3.zero));
            }
        }
    }
 void SpawnEffect(CutSceneEventDataList data)
 {
     if (data.ActionValue != -1)
     {
         G_GameInfo.SpawnEffect(data.ActionString, 1f, CutSceneMgr.CutSceneEventDic[(int)data.ActionValue].transform, CutSceneMgr.CutSceneEventDic[(int)data.ActionValue].transform, Vector3.one, (efftrn) =>
         {
             efftrn.localPosition = data.ActionPos;
             CutSceneMgr.EffectList.Add(efftrn.gameObject);
         });
     }
     else
     {
         G_GameInfo.SpawnEffect(data.ActionString, 1f, null, null, Vector3.one, (efftrn) =>
         {
             efftrn.localPosition = data.ActionPos;
             CutSceneMgr.EffectList.Add(efftrn.gameObject);
         });
     }
 }
예제 #5
0
    //< 소환되어진 유닛이 있다면 파괴하기위함
    public void DeleteUnit()
    {
        if (UnitList == null)
        {
            return;
        }

        for (int i = 0; i < UnitList.Count; i++)
        {
            if (UnitList[i] != null)
            {
                UnitList[i].EffectClear(true);
                G_GameInfo.SpawnEffect("Fx_Monster_RegenEnd_01", UnitList[i].transform.position, Quaternion.identity);
                G_GameInfo.CharacterMgr.RemoveUnit(UnitList[i]);
                TempCoroutine.Destroy(UnitList[i].gameObject);
            }
        }

        UnitList.Clear();
    }