Exemple #1
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);
        PlayAction(AnimatorState.Attack85000, m_Start);
        Transform t = null;
        //RolePropertyM rpm = m_Skin.iGameRole.GetRolePropertyM();
        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (posgo != null)
        {
            t = posgo.transform;
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1055031", t.position, t);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.5f);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
            SoundPlay.JoinPlayQueue("atc_thor", 1.5f);
        }
    }
Exemple #2
0
    /// <summary>
    /// 升级特效
    /// </summary>
    public void UpLevelEffect()
    {
        SoundPlay.Play("hero_promotion", false, false);
        Vector3 pos = new Vector3(0, -10, ConstantData.iDepBefore3DModel);
        GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "2000711",
                                                        pos, MyHead.EffectParent.gameObject.transform);

        gae.gameObject.AddComponent <SetRenderQueue>();

        if (gae != null)
        {
            GameObjectLoader.SetGameObjectLayer(gae.gameObject, MyHead.EffectParent.gameObject.layer);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(2f);
            gae.AddAction(ndEffect);
            gae.gameObject.transform.localPosition = pos;
        }
        UpReSetUI();
    }
    public override void ActiiveStart()
    {
        SoundPlay.Play(m_LifePrent.m_Attr.ModelType.ToString() + "_skill", false, false);
        Transform t = null;
        //RolePropertyM rpm = m_Skin.iGameRole.GetRolePropertyM();
        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (posgo != null)
        {
            t = posgo.transform;

            //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1001081",t.position,0.75f,true);
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1201041", t.position, m_LifePrent.GetLifeProp().transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.5f);
            gae.AddAction(ndEffect);
            //m_effectgo = gae.gameObject;
        }
    }
    public override void ActiiveStart()
    {
        SoundPlay.Play("skill_duang", false, false);
        Transform     t     = null;
        RolePropertyM rpm   = (m_Skin as RoleSkin).GetRolePropertyM();
        GameObject    posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (posgo != null)
        {
            t = posgo.transform;

            //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1001081",t.position,0.75f,true);
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, m_LifePrent.WalkDir == WalkDir.WALKLEFT? "1001111_01" : "1001111_02", t.position, t);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
        }
    }
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);
        PlayAction(AnimatorState.Attack85000, m_Start);
        SoundPlay.Play(m_LifePrent.m_Attr.ModelType.ToString() + "_atc", false, false);
        Transform t = null;
        //RolePropertyM rpm = m_Skin.iGameRole.GetRolePropertyM();
        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.FirePos);

        if (posgo != null)
        {
            t = posgo.transform;
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1201021", t.position, t);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
        }
    }
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);

        PlayAction(AnimatorState.Attack85000, m_Start);
        SoundPlay.Play("atc_hulk", false, false);

        GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (posgo != null)
        {
            Vector3 pos = posgo.transform.position;
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1401061", pos, posgo.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
        }
    }
    public void HitFly(WalkDir Dir, float duration, float delay, bool bearhit = false)
    {
        InBoat = false;
        Vector3 pos = GetPos();
        GameObjectActionExcute gaeTarget = EffectM.LoadEffect(EffectM.sPath, "1917011", pos, null);
        GameObjectActionSpawn  newSpawn  = new GameObjectActionSpawn();

        gaeTarget.AddAction(newSpawn);
        GameObjectActionDelayDestory ndEffectTarget = new GameObjectActionDelayDestory(duration);
        GameObjectActionBezierMove   nBezoerMove    = new GameObjectActionBezierMove(pos, duration, Dir);

        newSpawn.AddAction(ndEffectTarget);
        newSpawn.AddAction(nBezoerMove);
        Dead();
        //SetAnimator (Build_AnimatorState.Trigger30000);
        //m_Skill.ReSetCDTime();
        //m_bHitFly = true;
    }
Exemple #8
0
 public override void DoUpdate()
 {
     if (m_TimeCount > (m_EventTime - 0.0f) && (m_TimeCount - m_Delatime) < (m_EventTime - 0.0f))
     {
         GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
         if (posgo != null && (m_LifePrent as Role).RoleSkill.m_AttackTarget.m_thisT != null)
         {
             float fDistance = ((m_LifePrent as Role).m_thisT.position.x - (m_LifePrent as Role).RoleSkill.m_AttackTarget.m_thisT.position.x);
             fDistance = fDistance < 0?-fDistance:fDistance;
             GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "1054021", posgo.transform.position, posgo.transform);
             gae.transform.Rotate(new Vector3(0, 180, 0));
             Vector3 scale = gae.transform.localScale;
             //scale.x= fDistance/1.8f/2;
             gae.transform.localScale = scale;
             GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.5f);
             gae.AddAction(ndEffect);
         }
     }
 }
Exemple #9
0
    /// <summary>
    /// 播放技能升级特效
    /// </summary>
    private void PlayAddSkillEffect()
    {
        GameObject go = GameObjectLoader.LoadPath("effect/prefab/", "2001291", transform.parent.parent);

        if (go)
        {
            UIEffect UIDepth = go.AddComponent <UIEffect>();
            UIDepth.depth = 99;
            Vector3 pos = transform.parent.parent.InverseTransformPoint(MyHead.Spr2dSkill.transform.position);
            go.transform.localPosition = pos;
            GameObjectActionExcute       gae     = GameObjectActionExcute.CreateExcute(go);
            GameObjectActionDelayDestory destroy = new GameObjectActionDelayDestory(1.0f);
            gae.AddAction(destroy);
        }
        else
        {
            NGUIUtil.DebugLog("AddSkillEffect not found!!!");
        }
    }
    public override void StartWithTarget(Life Parent)
    {
        base.StartWithTarget(Parent);
        m_Dir = Parent.WalkDir;
        Transform t = m_Skin.tRoot;

        if (t != null)
        {
            //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1001031",t.position,m_Duration);
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, m_Dir == WalkDir.WALKRIGHT?"1101061_02":"1101061_01", t.position, BattleEnvironmentM.GetLifeMBornNode(true));
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
            if (m_Dir == WalkDir.WALKRIGHT)
            {
                m_effectgo.transform.Rotate(new Vector3(0, 180, 0), Space.Self);
            }
        }
    }
Exemple #11
0
    public override void StartWithTarget(Life Parent)
    {
        base.StartWithTarget(Parent);

        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (posgo != null)
        {
            //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1003091",
            // posgo.transform.position, m_Duration, posgo);
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1106031", posgo.transform.position, posgo.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
            gae.AddAction(ndEffect);
            Vector3 pos = gae.transform.localPosition;
            pos.z = 1.5f;
            gae.transform.localPosition = pos;
            m_effectgo = gae.gameObject;
        }
    }
Exemple #12
0
 public override void UpdatePos()
 {
     if (m_TimeCount < m_CastTime)
     {
         PlayAction(AnimatorState.Skill01, m_Start);
     }
     else if (m_TimeCount < (m_Duration - 0.5f))
     {
         if ((m_TimeCount - m_Delatime) < m_CastTime)
         {
             GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.GuoPos);
             if (posgo != null)
             {
                 //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1003091",
                 // posgo.transform.position, m_Duration, posgo);
                 GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1102011", posgo.transform.position, posgo.transform);
                 GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration - m_TimeCount);
                 gae.AddAction(ndEffect);
                 m_effectgo = gae.gameObject;
             }
         }
         PlayAction(AnimatorState.Skill01, m_Start);
     }
     else
     {
         if ((m_TimeCount - m_Delatime) < (m_Duration - 0.5f))
         {
             GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);
             if (posgo != null)
             {
                 //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1003091",
                 // posgo.transform.position, m_Duration, posgo);
                 Vector3 pos = posgo.transform.position;
                 pos.z -= 2f;
                 GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1051161", posgo.transform.position, posgo.transform);
                 GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
                 gae.AddAction(ndEffect);
                 m_effectgo = gae.gameObject;
             }
         }
         PlayAction(AnimatorState.Attack80100, m_Start);
     }
 }
Exemple #13
0
 public override void ActiiveStart()
 {
             #if UNITY_EDITOR_LOG
     App.log.PrintSelf(PRINT.TXM, m_AttackSceneID.ToString());
             #endif
     GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
     if (posgo != null)
     {
         //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1003091",
         // posgo.transform.position, m_Duration, posgo);
         GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1106041", posgo.transform.position, posgo.transform);
         GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
         gae.AddAction(ndEffect);
         Vector3 pos = gae.transform.localPosition;
         pos.z = 1.5f;
         gae.transform.localPosition = pos;
         m_effectgo = gae.gameObject;
     }
 }
Exemple #14
0
    /// <summary>
    /// 到攻击目标位置
    /// </summary>
    private void DoToAttackPos()
    {
        m_Owner.m_Skin.SetVisable(true);
        if (m_petFollow)
        {
            m_petFollow.m_IsFollow = false;
        }

        if (!m_bGotoAttackPos)
        {
            m_bGotoAttackPos = true;
            GameObject posgo = m_Owner.m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.FirePos);
            if (posgo != null)
            {
                GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "1003041", posgo.transform.position, posgo.transform);
                if (gae != null)
                {
                    GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(10f);
                    gae.AddAction(ndEffect);
                    m_effect = gae.gameObject;
                }
            }
        }
        if (m_CurrentAction == null)
        {
            m_CurrentAction = m_run.GetNextAction();
        }
        else if (m_CurrentAction.IsDone())
        {
            GridActionCmd preaction = m_CurrentAction;
            m_CurrentAction = m_run.GetNextAction();

            DoPathEvent(preaction);
        }
        if (m_CurrentAction != null && m_petState != Pet1002State.Follow)
        {
            m_CurrentAction.Update();
        }
        else
        {
            DoAttack();
        }
    }
    public override void DoEvent()
    {
        base.DoEvent();

        if (m_LifePrent.m_Attr.IsHide)
        {
            if ((m_LifePrent as Role).Target is Role)
            {
                GameObject posgo = (m_LifePrent as Role).Target.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);
                if (posgo != null)
                {
                    //GameObject go = SkillEffects._instance.LoadEffect("effect/prefab/", "1051151",posgo.transform.position,1f,true);
                    GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1051061", posgo.transform.position, BattleEnvironmentM.GetLifeMBornNode(true));
                    GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.6f);
                    gae.AddAction(ndEffect);
                }
            }
        }
        SoundPlay.Play("act_yidao", false, false);
    }
Exemple #16
0
    public override void DoEvent()
    {
        GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);

        if (posgo != null && (m_LifePrent as Role).RoleSkill.m_AttackTarget.m_thisT != null)
        {
            float  fDistance = ((m_LifePrent as Role).GetPos().x - (m_LifePrent as Role).RoleSkill.m_AttackTarget.GetPos().x);
            string strEffect = "1054051_01";
            if (m_Dir == WalkDir.WALKRIGHT)
            {
                strEffect = "1054051_02";
            }
            GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, strEffect, posgo.transform.position, null);
            gae.transform.parent = null;
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.7f);
            gae.AddAction(ndEffect);
            (m_LifePrent as Role).RoleSkinCom.SetVisable(false);
        }
        base.DoEvent();
    }
 public override void DoAttackEvent()
 {
     if ((m_LifePrent as Role).RoleSkill.m_AttackTarget != null && (m_LifePrent as Role).RoleSkill.m_AttackTarget is Role && (m_LifePrent as Role).RoleSkill.m_AttackTarget.m_Attr.AttrType != 102003 && (m_LifePrent as Role).RoleSkill.m_AttackTarget.m_Status.HaveState(StatusType.ClickFly))
     {
         ((m_LifePrent as Role).RoleSkill.m_AttackTarget as Role).HitFly(m_Dir, 2.3f, 0f, true);
         GameObject posgo = (m_LifePrent as Role).RoleSkill.m_AttackTarget.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);
         if (posgo != null)
         {
             //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1003091",
             // posgo.transform.position, m_Duration, posgo);
             Vector3 pos = posgo.transform.position;
             pos.z -= 4;
             GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "2000361", pos, null);
             GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.6f);
             gae.AddAction(ndEffect);
         }
         (m_LifePrent as Role).ChangeTarget(ChangeTargetReason.HitFlyClearTarget, null);
         //AIPathConditions.AIPathEvent(new AIEventData(AIEvent.EVENT_SELFSP),m_LifePrent);
     }
 }
Exemple #18
0
    public void PlayResourceAni(ResourceType Type)
    {
        if (Type == ResourceType.Gold)
        {
            MyHead.OurMoneyPos.GetComponent <Animation>().Play();
        }
        else if (Type == ResourceType.Wood)
        {
            MyHead.OurWoodPos.GetComponent <Animation>().Play();
        }
        else if (Type == ResourceType.Box)
        {
            MyHead.OurBoxPos.GetComponent <Animation>().Play();
        }
        Transform t = GetResourcePos(Type);
        GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "2001321", t.position, t);
        GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.5f);

        gae.AddAction(ndEffect);
    }
Exemple #19
0
 /// <summary>
 ///  攻击范围 光效完整环
 /// </summary>
 /// <param name="isShow">是否显示</param>
 /// <param name="radius">攻击半径</param>
 public void ShowAttackRange(bool isShow, int radius = 1)
 {
     if (isShow)
     {
         if (AttackRangeInCircle01 == null && AttackRangeInCircle02 == null)
         {
             AttackRangeInCircle01 = GameObjectLoader.LoadPath("effect/prefab/", "2000661_01", m_thisT);
             Vector3 pos = AttackRangeInCircle01.transform.position;
             AttackRangeInCircle01.transform.position = U3DUtil.AddX(pos, 1.5f);
             pos = AttackRangeInCircle01.transform.position;
             AttackRangeInCircle01.transform.position = U3DUtil.AddY(pos, 1.5f);
             AttackRangeInCircle01.transform.Rotate(0, -180f, 0);
             GameObjectActionExcute       gae  = AttackRangeInCircle01.AddComponent <GameObjectActionExcute>();
             GameObjectActionWait         wait = new GameObjectActionWait(1f, ShowInLoop01);
             GameObjectActionDelayDestory fade = new GameObjectActionDelayDestory(1.0f);
             gae.AddAction(wait);
             gae.AddAction(fade);
         }
         if (AttackRangeOutCircle01 == null && AttackRangeOutCircle02 == null)
         {
             AttackRangeOutCircle01 = GameObjectLoader.LoadPath("effect/prefab/", "2000671_01", m_thisT);
             Vector3 pos = AttackRangeOutCircle01.transform.position;
             AttackRangeOutCircle01.transform.position = U3DUtil.AddX(pos, 1.5f);
             pos = AttackRangeOutCircle01.transform.position;
             AttackRangeOutCircle01.transform.position = U3DUtil.AddY(pos, 1.5f);
             AttackRangeOutCircle01.transform.Rotate(0, -180f, 0);
             GameObjectActionExcute       gae  = AttackRangeOutCircle01.AddComponent <GameObjectActionExcute>();
             GameObjectActionWait         wait = new GameObjectActionWait(1.0f, ShowInLoop02);
             GameObjectActionDelayDestory fade = new GameObjectActionDelayDestory(1.0f);
             gae.AddAction(wait);
             gae.AddAction(fade);
         }
     }
     else
     {
         U3DUtil.Destroy(AttackRangeInCircle01);
         U3DUtil.Destroy(AttackRangeInCircle02);
         U3DUtil.Destroy(AttackRangeOutCircle01);
         U3DUtil.Destroy(AttackRangeOutCircle02);
     }
 }
Exemple #20
0
 /// <summary>
 /// 房间爆炸
 /// </summary>
 public void DestroyRoom()
 {
     if (m_building != null)
     {
         //金库延时爆掉
         if (m_building.m_roomType == RoomType.ResRoom && m_building.m_thisT != null)
         {
             GameObjectActionExcute gae = m_building.m_thisT.gameObject.AddComponent <GameObjectActionExcute>();
             if (gae != null)
             {
                 GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(4.0f);
                 gae.AddAction(ndEffect);
             }
         }
         else if (m_building.isDead == false)
         {
             m_building.KillSelf(0);
             m_building = null;
         }
     }
 }
    //闪黄
    void Step1(object o)
    {
        if (MyHead.Content != null)
        {
            MyHead.Content.SetActive(false);
        }
        DestoryEffect(true);
        GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "2000401_04",
                                                        Vector3.zero, MyHead.Drop);

        gae.gameObject.AddComponent <SetRenderQueue>();

        if (gae != null)
        {
            GameObjectLoader.SetGameObjectLayer(gae.gameObject, MyHead.Drop.gameObject.layer);
            m_effect.Add(gae.gameObject);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.27f);
            ndEffect.m_complete = Step2;
            gae.AddAction(ndEffect);
        }
    }
    public override void DoEvent()
    {
        base.DoEvent();
        GameObject gpos2 = m_Skin.ProPerty.gameObject;
        MapGrid    g     = m_LifePrent.GetMapGrid();
        int        dis   = 6;

        if (m_LifePrent.WalkDir == WalkDir.WALKLEFT)
        {
            for (int n = 0; n < dis; n++)
            {
                if (g.Right != null)
                {
                    g = g.Right;
                }
                else
                {
                    break;
                }
            }
        }
        else if (m_LifePrent.WalkDir == WalkDir.WALKRIGHT)
        {
            for (int n = 0; n < dis; n++)
            {
                if (g.Left != null)
                {
                    g = g.Left;
                }
                else
                {
                    break;
                }
            }
        }
        GameObjectActionExcute       gae2     = EffectM.LoadEffect(EffectM.sPath, "1402031", g.WorldPos, gpos2.transform);
        GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(3f);

        m_effectgo = gae2.gameObject;
    }
    public override void DoUpdate()
    {
        if (m_TimeCount < 1f)
        {
            PlayAction(AnimatorState.Attack85000, m_Start);
        }
        else if (m_TimeCount < 2f)
        {
            PlayAction(AnimatorState.Attack85100, m_Start);
            if ((m_TimeCount - m_Delatime) < 1f)
            {
                GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
                if (posgo != null)
                {
                    Vector3 pos = posgo.transform.position;
                    GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1401041", pos, posgo.transform);
                    GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
                    gae.AddAction(ndEffect);
                    m_effectgo = gae.gameObject;
                }
            }
        }
        else
        {
            PlayAction(AnimatorState.Attack85200, m_Start);

            if ((m_TimeCount - m_Delatime) < 2f)
            {
                GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
                if (posgo != null)
                {
                    Vector3 pos = posgo.transform.position;
                    GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1401051", pos, posgo.transform);
                    GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
                    gae.AddAction(ndEffect);
                    m_effectgo = gae.gameObject;
                }
            }
        }
    }
Exemple #24
0
    /*public override bool ApplyDamage (SkillReleaseInfo Info, Transform attackgo)
     * {
     *  Shake ();
     *  return base.ApplyDamage (Info, attackgo);
     * }*/
    /*public override void Shake()
     * {
     *  if (!isDead)
     *  {
     *          if (Time.time-m_fShowHitActionTime>0.5f)
     *          {
     *                  m_fShowHitActionTime = Time.time;
     *                  iTween.ShakePosition(m_thisT.gameObject, new Vector3(0.4f,0.8f,0), 0.5f);
     *                  for(int i = 0; i < m_lTrap.Count; i++)
     *                  {
     *                          m_lTrap[i].Shake();
     *                  }
     *          }
     *
     *  }
     * }*/

    public void AddStatusEffect(StatusInfo Info)
    {
        BuildInfo info = CmCarbon.GetBuildInfo(m_Core.m_DataID);

        for (int i = 0; i < info.m_Shape.height; i++)
        {
            for (int j = 0; j < info.m_Shape.width; j++)
            {
                if (info.m_Shape.GetShapeValue(i, j) == 1)
                {
                    MapGrid g = MapGrid.GetMG(info.m_cy + i, info.m_cx + j * MapGrid.m_UnitRoomGridNum);
                    GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", Info.effectid.ToString(), g.WorldPos, null);
                    if (gae != null)
                    {
                        gae.transform.parent = m_thisT;
                        GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(Info.time);
                        gae.AddAction(ndEffect);
                    }
                }
            }
        }
    }
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);

        PlayAction(AnimatorState.Attack86000, m_Start);

        GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (posgo != null)
        {
            Vector3 pos  = posgo.transform.position;
            string  name = "1401171_01";
            if (m_LifePrent.WalkDir == WalkDir.WALKRIGHT)
            {
                name = "1401171_02";
            }
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, name, pos, posgo.transform.GetChild(0));
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
        }
    }
Exemple #26
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);

        PlayAction(AnimatorState.Attack85000, m_Start);
        SoundPlay.Play("atc_viking", false, false);
        if (m_LifePrent.m_Status.HaveState(StatusType.Berserker))
        {
            GameObject                   gpos     = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1104031", gpos.transform.position, gpos.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(180.0f);

            m_effectgo = gae.gameObject;
        }
        else
        {
            GameObject                   gpos     = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1104021", gpos.transform.position, gpos.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(180.0f);
            m_effectgo = gae.gameObject;
        }
    }
Exemple #27
0
    /// <summary>
    /// 攻击技能释放
    /// </summary>
    public void DoSkill(DoAttackFun DoAttackFun, SoldierSkill info, int times)
    {
        if (info.m_type == 1029 || info.m_type == 1031)
        {
            string name = "1003101";
            if (info.m_type == 1031)
            {
                name = "1003111";
            }
            GameObject posgo = m_Owner.m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.LeftHandPos);
            if (posgo != null)
            {
                GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, name, posgo.transform.position, posgo.transform);
                m_effectGo = gae.gameObject;
                if (gae != null)
                {
                    GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(2f);
                    gae.AddAction(ndEffect);
                }
            }
        }
        m_petState       = Pet1002State.toAttackPos;
        m_DoAttackFun    = DoAttackFun;
        m_skillInfo      = info;
        m_times          = times;
        m_Owner.m_target = m_Owner.m_Parent.m_Skill.m_AttackTarget;
        Int2 mappos = m_Owner.m_Parent.GetMapPos();

        if ((m_Owner.m_Parent as Role).WalkDir == WalkDir.WALKLEFT)
        {
            mappos.Unit -= 3;
        }
        else
        {
            mappos.Unit += 3;
        }
        m_run.SetBorn(mappos, 0);
        m_run.UpdataPath();
    }
Exemple #28
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);
        PlayAction(AnimatorState.Attack81000, m_Start);

        //RolePropertyM rpm = m_Skin.iGameRole.GetRolePropertyM();
        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (posgo != null)
        {
            Vector3 pos = posgo.transform.position;
            GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "1055041", pos, posgo.transform);
            Life    ttagrt             = (m_LifePrent as Role).RoleSkill.m_AttackTarget;
            Vector3 tpos = ttagrt.GetCenterPos();
            float   dis  = Mathf.Abs(posgo.transform.position.x - tpos.x);
            pos.x = tpos.x;
            gae.transform.localScale = new Vector3(dis * 0.25f, 1, 1);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(2f);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
        }
    }
Exemple #29
0
    public override void ActiiveStart()
    {
        Life w = m_LifePrent.m_Skill.m_SkillTarget;

        if (w != null)
        {
            GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
            if (posgo != null)
            {
                float fDistance = ((m_LifePrent as Role).m_thisT.position.x - w.m_thisT.position.x);
                fDistance = fDistance < 0?-fDistance:fDistance;
                Vector3 pos = posgo.transform.position;
                GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "1054071", posgo.transform.position, posgo.transform);
                Vector3 scale = gae.transform.localScale;
                //scale.x= fDistance/2.4f;
                gae.transform.localScale = scale;
                GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(4f);
                gae.AddAction(ndEffect);
            }
            Vector3 pos1 = w.m_thisT.position;
            if (w is Role)
            {
                posgo = w.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);
                pos1  = posgo.transform.position;
            }
            else
            {
                pos1 += new Vector3(0, 2, 0);
            }
            //if (posgo != null)
            {
                GameObjectActionExcute       gaeTarget      = EffectM.LoadEffect(EffectM.sPath, "1054081", pos1, BattleEnvironmentM.GetLifeMBornNode(true));
                GameObjectActionDelayDestory ndEffectTarget = new GameObjectActionDelayDestory(4f);
                gaeTarget.AddAction(ndEffectTarget);

                SoundPlay.Play("skill_maonv", false, false);
            }
        }
    }
Exemple #30
0
 public override void UpdatePos()
 {
     if (m_TimeCount > (m_eventtime - 0.0f) && (m_TimeCount - m_Delatime) < (m_eventtime - 0.0f))
     {
         GameObject posgo           = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
         Life       lifeBuildTarget = (m_LifePrent as Role).RoleSkill.PropSkillInfo.m_LifeTarget;
         if (posgo != null && lifeBuildTarget.m_thisT != null)
         {
             float fDistance = ((m_LifePrent as Role).m_thisT.position.x - lifeBuildTarget.m_thisT.position.x);
             fDistance = fDistance < 0?-fDistance:fDistance;
             GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "1054021", posgo.transform.position, m_LifePrent.GetLifeProp().transform);
             Vector3 scale = gae.transform.localScale;
             scale.x = fDistance / 1.8f;
             gae.transform.localScale = scale;
             GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.5f);
             gae.AddAction(ndEffect);
         }
         if (lifeBuildTarget is Building)
         {
             {
                 Building building = lifeBuildTarget as Building;
                 if (building != null)
                 {
                     building.HitFly(m_LifePrent.WalkDir, 3f, 0f, false);
                 }
             }
         }
         else if (lifeBuildTarget is InheritSummonPros)
         {
             {
                 InheritSummonPros building = lifeBuildTarget as InheritSummonPros;
                 if (building != null)
                 {
                     building.HitFly(m_LifePrent.WalkDir, 3f, 0f, false);
                 }
             }
         }
     }
 }