예제 #1
0
 void SetEffect()
 {
     if (m_type == ResourceType.Gold)
     {
         CombatInfoWnd Wnd = WndManager.FindDialog <CombatInfoWnd>();
         if (Wnd != null)
         {
             Transform parent           = Wnd.GetResourcePos(m_type);
             GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "2000301", parent.position, parent);
             if (gae != null)
             {
                 GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.5f);
                 gae.AddAction(ndEffect);
             }
         }
     }
     else if (m_type == ResourceType.Wood)
     {
         CombatInfoWnd Wnd = WndManager.FindDialog <CombatInfoWnd>();
         if (Wnd != null)
         {
             Transform parent           = Wnd.GetResourcePos(m_type);
             GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "2000311", parent.position, parent);
             if (gae != null)
             {
                 GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.5f);
                 gae.AddAction(ndEffect);
             }
         }
     }
 }
예제 #2
0
 public void GoldCoinEffect(int num, int count)
 {
     for (int i = 0; i < num; i++)
     {
         Vector3 pos = MapGrid.GetMG(m_Attr.Pos).pos;            //+new Vector3(Random.Range(1,m_Attr.Size*0.5f-2),-0.5f,1f);
         pos += new Vector3(0, 0.25f, 1.2f);
         pos  = BattleEnvironmentM.Local2WorldPos(pos);
         int n = (int)count / num;
         if (i == 0)
         {
             n += count - num * ((int)count / num);
         }
         GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "2000041", EffectCamera.GetEffectPos(pos), BattleEnvironmentM.GetLifeMBornNode(true));
         //EffectCamera.AddFollowList(gae.transform,pos);
         if (gae != null)
         {
             GameObjectActionResourceDrop gaw = new GameObjectActionResourceDrop(2f, pos, pos + new Vector3(Random.Range(-1.5f, 1.5f), 0, 0));
             gae.AddAction(gaw);
             GameObjectActionResourceFlyToUI gar = new GameObjectActionResourceFlyToUI();
             gar.SetData(EffectCamera.camera, WndManager.GetNGUICamera(), n, ResourceType.Gold);
             gae.AddAction(gar);
             GameObject coin = U3DUtil.FindChild(gae.gameObject, "coin");
             if (coin != null)
             {
                 coin.GetComponent <ParticleSystem>().startDelay = Random.Range(1f, 1.5f);
             }
         }
     }
 }
예제 #3
0
    public override void ActiiveStart()
    {
        //NGUIUtil.DebugLog("蹦达与蹦蹦大招 天雨散弹  ActiiveStart", "orange");
        //动作光效 蹦大 挥棍

        SoundPlay.Play("skill_voice_boom", false, false);
        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.FirePos);

        if (posgo != null)
        {
            GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "1003061", posgo.transform.position, posgo.transform);
            if (gae != null)
            {
                GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration);
                gae.AddAction(ndEffect);
                m_effectgo = gae.gameObject;
            }
            else
            {
                m_effectgo = null;
            }
        }
        if (m_LifePrent is Role)
        {
            Pet pet = (m_LifePrent as Role).CurPet;
            if (pet != null && pet.PetMoveAI is PetWalk1002)
            {
                (pet.PetMoveAI as PetWalk1002).m_petState = Pet1002State.bigSkill;
            }
        }
    }
예제 #4
0
    public override void RangeTarget(List <Life> llist)
    {
        GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);

        if (posgo != null)
        {
            Vector3 pos = posgo.transform.position;
            pos.z = -1.5f;

            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1004061", posgo.transform.position, posgo.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
            gae.AddAction(ndEffect);
            for (int i = 0; i < llist.Count; i++)
            {
                if (llist[i].m_thisT != null)
                {
                    gae      = EffectM.LoadEffect(EffectM.sPath, "1004051", posgo.transform.position, m_LifePrent.GetLifeProp().transform.parent);
                    ndEffect = new GameObjectActionDelayDestory(1f);
                    gae.AddAction(ndEffect);
                    float dis = m_LifePrent.m_thisT.localPosition.x - llist[i].m_thisT.localPosition.x;
                    gae.transform.localScale = new Vector3(dis * 0.23f, 1, 1);
                }
            }
        }
    }
예제 #5
0
파일: Life.cs 프로젝트: 741645596/batgame
 public virtual void DeadEffect()
 {
     if (this is Role)
     {
         RoleSkin   skin  = GetSkin() as RoleSkin;
         Vector3    pos   = Vector3.zero;
         GameObject posgo = GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);
         if (posgo != null)
         {
             pos = posgo.transform.position;
         }
         pos.z = 1.5f;
         //SkillEffects._instance.LoadEffect("effect/prefab/", "2000231",pos,1f);
         GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "2000231", pos, BattleEnvironmentM.GetLifeMBornNode(true));
         GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
         gae.AddAction(ndEffect);
     }
     else if (this is Building)
     {
         Vector3 pos = GetPos();
         pos.y += 1.5f;
         GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "2000271", pos, BattleEnvironmentM.GetLifeMBornNode(true));
         GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
         gae.AddAction(ndEffect);
     }
 }
예제 #6
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);
        if ((Parent as Role).m_Pet == null)
        {
            (Parent as Role).CreatePet();
        }
        PlayAction(AnimatorState.Attack81000, m_Start);
        //动作光效 蹦大 挥棍
        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.FirePos);

        if (posgo != null)
        {
            GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "1003061", posgo.transform.position, posgo.transform);
            if (gae != null)
            {
                GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration);
                gae.AddAction(ndEffect);
                m_effectgo = gae.gameObject;
            }
        }

        if (m_LifePrent is Role)
        {
            Pet pet = (m_LifePrent as Role).CurPet;
            if (pet != null && pet.PetMoveAI is PetWalk1002)
            {
                (pet.PetMoveAI as PetWalk1002).m_petState = Pet1002State.toFirePos;
            }
        }
    }
예제 #7
0
    public override void UpdatePos()
    {
        if (m_TimeCount < m_eventtime)
        {
            PlayAction(AnimatorState.Skill01, m_Start);
        }
        else
        {
            //Vector3	pos = Vector3.Lerp(m_Start,m_End,(m_TimeCount - m_EventTime) / m_walktime );
            PlayAction(AnimatorState.Skill01, m_Start);
            //AIPathConditions.AIPathEvent(new AIEventData(AIEvent.EVENT_SELFSP),m_LifePrent);
        }


        if (m_TimeCount > m_Effecttime && (m_TimeCount - m_Delatime) <= m_Effecttime)
        {
            GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
            if (posgo != null)
            {
                Vector3 pos = posgo.transform.position;
                pos.z -= 4f;
                string name = "1401101_01";
                if (m_LifePrent.WalkDir == WalkDir.WALKRIGHT)
                {
                    name = "1401101_02";
                }
                GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, name, pos, BattleEnvironmentM.GetLifeMBornNode(true));
                GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.5f);
                gae.AddAction(ndEffect);
                m_effectgo = gae.gameObject;
            }
        }
    }
예제 #8
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 goLeftHand  = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.LeftHandPos);
        GameObject goRightHand = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.LeftHandPos);

        if (goLeftHand != null && goRightHand != null)
        {
            t = goLeftHand.transform;
            GameObjectActionExcute       gaeLeftHand = EffectM.LoadEffect(EffectM.sPath, "1202031_01", t.position, t);
            GameObjectActionDelayDestory ndEffectL   = new GameObjectActionDelayDestory(1.5f);
            gaeLeftHand.AddAction(ndEffectL);

            t = goRightHand.transform;
            GameObjectActionExcute       gaeRightHand = EffectM.LoadEffect(EffectM.sPath, "1202031_01", t.position, t);
            GameObjectActionDelayDestory ndEffectR    = new GameObjectActionDelayDestory(1.5f);
            gaeRightHand.AddAction(ndEffectR);
            m_effectgo = gaeRightHand.gameObject;

            SoundPlay.JoinPlayQueue("atc_thor", 1.5f);
        }
        GameObject goRoot = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (goRoot != null)
        {
            t = goRoot.transform;
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1202031_02", t.position, t);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(0.5f);
            gae.AddAction(ndEffect);
        }
    }
예제 #9
0
    public override void ActiiveStart()
    {
        SoundPlay.Play("skill_thor", false, false);
        Transform t = null;
        //RolePropertyM rpm = m_Skin.iGameRole.GetRolePropertyM();
        // 尾巴
        GameObject goTail = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.Bone1Pos);

        if (goTail != null)
        {
            t = goTail.transform;
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1202061_01", t.position, m_LifePrent.GetLifeProp().transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.5f);
            gae.AddAction(ndEffect);
        }

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

        if (posgo != null && (m_LifePrent as Role).RoleSkill.m_AttackTarget.m_thisT != null)
        {
            Vector3 pos = posgo.transform.position;
            //pos.z  = -1.5f;
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1202061_02", posgo.transform.position, posgo.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(2f);
            gae.AddAction(ndEffect);

            /*Life ttagrt = (m_LifePrent as Role).RoleSkill.m_AttackTarget;
             * Vector3 tpos = ttagrt.GetCenterPos();
             *
             * float dis = Mathf.Abs(posgo.transform.position.x - tpos.x);
             * gae.transform.localScale = new Vector3(-dis * 0.25f, 1, 1);*/
        }

        PlayAction(AnimatorState.Skill01, m_Start);
    }
예제 #10
0
    /// <summary>
    /// 播放特效
    /// </summary>
    public void PlayTrapEffect(string effectName, float deadtime)
    {
        if (m_building == null)
        {
            return;
        }
        if (m_building.m_roomType == RoomType.ResRoom)
        {
            return;
        }
        Vector3 Pos = GetWorldPos();

        if (effectName == "2000651")
        {
            Pos.z -= 10;
            Pos.x -= MapGrid.m_width / 2;
            Pos.y  = Pos.y - MapGrid.m_heigth / 2 + 0.3f;
        }
        else
        {
            Pos.z -= 1;
        }

        GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", effectName,
                                                        Pos, BattleEnvironmentM.GetLifeMBornNode(true));

        if (gae != null)
        {
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(deadtime);
            gae.AddAction(ndEffect);
        }
    }
예제 #11
0
    public override void ActiiveStart()
    {
        PlayAction(AnimatorState.Attack87000, m_Start);

        string                       effName  = m_Dir == WalkDir.WALKLEFT?"1402051_01":"1405051_02";
        GameObject                   gpos     = m_Skin.ProPerty.gameObject;
        GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, effName, gpos.transform.position, gpos.transform);
        GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(3f);

        gae.AddAction(ndEffect);
        m_effectgo = gae.gameObject;
        GameObject gpos2 = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.LeftHandPos);

        GameObjectActionExcute gae2 = EffectM.LoadEffect(EffectM.sPath, "1402041", gpos2.transform.position, gpos2.transform);

        m_effectgo = gae.gameObject;
        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);

        if (posgo != null)
        {
            //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1000011",posgo.transform.position,1.5f);
            gae      = EffectM.LoadEffect(EffectM.sPath, "1000011", posgo.transform.position, BattleEnvironmentM.GetLifeMBornNode(true));
            ndEffect = new GameObjectActionDelayDestory(1.5f);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
            m_effectgo.transform.position += new Vector3(0, 0, -2);
        }
    }
예제 #12
0
    static void DropResourceBoxEffect(string name, sdata.s_itemtypeInfo item, Vector3 pos)
    {
        pos    = BattleEnvironmentM.Local2WorldPos(pos);
        pos.x += 0.5f;
        pos.z  = 0;
        GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", name, EffectCamera.GetEffectPos(pos), BattleEnvironmentM.GetLifeMBornNode(true));

        EffectCamera.AddFollowList(gae.transform, pos);
        if (gae != null)
        {
            //先等待
            GameObjectActionBoxWait gaw = new GameObjectActionBoxWait(2f);
            gae.AddAction(gaw);
            //open box
            GameObjectActionOpenBox gaopen = new GameObjectActionOpenBox(2.0f, item);
            gae.AddAction(gaopen);

            Animator ani = gae.gameObject.GetComponent <Animator>();
            if (null != ani)
            {
                int nValue = (int)Random.value % 2;
                if (nValue == 0)
                {
                    nValue = 2;
                }
                ani.SetInteger("iState", nValue);
            }
        }
    }
예제 #13
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);

        PlayAction(AnimatorState.Attack81000, m_Start);

        GameObject gpos = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.FirePos);

        if (gpos != null)
        {
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1105021_01", gpos.transform.position, gpos.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
        }
        GameObject gpos2 = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (gpos2 != null)
        {
            GameObjectActionExcute       gae2     = EffectM.LoadEffect(EffectM.sPath, "1105021_02", gpos2.transform.position, gpos2.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration);
            gae2.AddAction(ndEffect);
            m_effectgo = gae2.gameObject;
        }
    }
예제 #14
0
    /// <summary>
    /// 点击场景角色或物件
    /// </summary>
    void MouseDownInTheScene()
    {
        //释放怒气
        if (Input.GetMouseButtonDown(0))
        {
            Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;
            if (Physics.Raycast(ray, out hit, 100, 1 << LayerMask.NameToLayer("Role")))
            {
                Role w = hit.transform.GetComponentInParent <LifeProperty>().GetLife() as Role;
                if (w != null && w.m_Core.m_IsPlayer == true)
                {
                    if (w.Anger >= ConfigM.GetAngerK(1))
                    {
                        w.ReleaseSkillEffect();
                    }
                }
            }
            ray = EffectCamera.camera.ScreenPointToRay(Input.mousePosition);
            //拾取资源
            if (Physics.Raycast(ray, out hit, 100, 1 << LayerMask.NameToLayer("Resource")))
            {
                GameObjectActionExcute gae = hit.transform.GetComponentInParent <GameObjectActionExcute>();

                if (gae != null)
                {
                    GameObjectAction ga = gae.GetCurrentAction();
                    if (ga is GameObjectActionWait || ga is GameObjectActionBoxWait)
                    {
                        gae.GoNextAction();
                    }
                }
            }
        }
    }
예제 #15
0
 /// <summary>
 ///  攻击范围 光效半圆环
 /// </summary>
 /// <param name="isShow">是否显示</param>
 /// <param name="radius">攻击半径</param>
 public void ShowAttackRangeSemi(bool isShow, float radius = 1.0f)
 {
     if (isShow)
     {
         if (AttackRangeSemiCircle02 == null && AttackRangeSemiCircle01 == null)
         {
             AttackRangeSemiCircle01 = GameObjectLoader.LoadPath("effect/prefab/", "2000681_01", m_thisT);
             Vector3 pos = AttackRangeSemiCircle01.transform.position;
             AttackRangeSemiCircle01.transform.position = U3DUtil.AddX(pos, 1.5f);
             AttackRangeSemiCircle01.transform.Rotate(0, -180f, 0);
             GameObjectActionExcute       gae  = AttackRangeSemiCircle01.AddComponent <GameObjectActionExcute>();
             GameObjectActionWait         wait = new GameObjectActionWait(1 + Time.deltaTime, ShowSemiLoop);
             GameObjectActionDelayDestory fade = new GameObjectActionDelayDestory(1f);
             gae.AddAction(wait);
             gae.AddAction(fade);
         }
     }
     else
     {
         if (AttackRangeSemiCircle01)
         {
             GameObject.Destroy(AttackRangeSemiCircle01);
         }
         if (AttackRangeSemiCircle02)
         {
             GameObject.Destroy(AttackRangeSemiCircle02);
         }
     }
 }
예제 #16
0
    public void UpQualityEffect()
    {
        SetEnableQuality(true);

        SoundPlay.Play("hero_promotion", false, false);
        UpReSetUI();

        Vector3 pos = new Vector3(0, -10, ConstantData.iDepBefore3DModel);
        GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "2000721",
                                                        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;
        }

        int iHpAdd = m_Info.m_hp - m_backUpBuild.m_hp;
        int iPower = m_Info.m_DefensePower - m_backUpBuild.m_DefensePower;

        AddHudTextShow(NGUIUtil.GetStringByKey(10000080) + " +" + iPower.ToString("0.00"));
        AddHudTextShow(NGUIUtil.GetStringByKey(10000081) + " +" + iHpAdd.ToString("0.00"), 0.8f);

        NGUIUtil.ExcuteWaitAction(gameObject, 1.8f, ShowUpQuilityWndCallBack);
    }
예제 #17
0
    void AddEffect(object o)
    {
        GameObjectActionExcute gae = gameObject.GetComponent <GameObjectActionExcute>();

        if (gae)
        {
            GameObjectActionWait wait = gae.GetCurrentAction() as GameObjectActionWait;
            if (wait != null)
            {
                int   level = (int)wait.Data1;
                float fill  = (float)wait.Data2;
                bool  bShow = (bool)wait.Data3;

                NGUIUtil.UpdateExpFromValue(MyHead.SprNumPercentage, fill, 0.1f);

                NGUIUtil.SetLableText <string>(MyHead.LblLv, level.ToString());

                if (gae.GetNextAction() == null)
                {
                    MyHead.LblNumUsed.gameObject.SetActive(false);
                }
                else
                {
                    MyHead.LblNumUsed.gameObject.SetActive(bShow);
                }
            }
        }
    }
예제 #18
0
파일: Wall.cs 프로젝트: 741645596/batgame
    /// <summary>
    /// 撞击处理
    /// </summary>
    /// <param name="Damage">撞击伤害</param>
    /// <param name="dir">撞击方向</param>
    /// <param name="Info">返回撞击信息</param>
    /// <returns></returns>
    public override void CollisionProcByFire(Collision collision, int Damage /*,Vector2 dir*/, ref FlyCollisionInfo Info, FlyDir flydir)
    {
        Role.WakeEnemy(this);
        Info.bVertical           = true;
        Info.FlyfallSTandGridPos = new Int2(StartUnit, Layer);
        SkillReleaseInfo sInfo = new SkillReleaseInfo();

        sInfo.m_InterruptSkill = false;
        sInfo.m_MakeStatus     = new List <StatusType> ();
        sInfo.m_bImmunity      = false;
        sInfo.m_Damage         = Damage;
        sInfo.Result           = AttackResult.Fire;
        ApplyDamage(sInfo, null);
        if (isDead)   //破了
        {
            Info.flyCollisionAction = FlyCollisionAction.PauseContinueFlyDirectional;
            Info.bApplyDamage       = true;
            EffectM.LoadEffect(EffectM.sPath, "zamen_02", m_thisT.position, null);
        }
        else          //没破
        {
            Info.flyCollisionAction = FlyCollisionAction.DropInBoat;
            Info.bApplyDamage       = false;
            GameObjectActionExcute       gae1      = EffectM.LoadEffect(EffectM.sPath, "zamen_01", m_thisT.position, null);
            GameObjectActionDelayDestory ndEffect1 = new GameObjectActionDelayDestory(1f);
            gae1.AddAction(ndEffect1);
        }
    }
예제 #19
0
    /// <summary>
    /// 执行攻击
    /// </summary>
    private void DoAttack()
    {
        if (m_effect != null)
        {
            /*m_effect.DestroyEffect();
             * m_effect = null;*/
            GameObject.Destroy(m_effect);
        }
        GameObject.Destroy(m_effectGo);
        GameObject posgo = m_Owner.m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.FirePos);

        if (posgo != null && m_Owner.m_target != null)
        {
            GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "1003031", posgo.transform.position, m_Owner.m_target.m_thisT);
            if (gae != null)
            {
                GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.3f);
                gae.AddAction(ndEffect);
            }
        }
        m_Owner.m_Skin.tRoot.position = m_Owner.m_Parent.GetSkin().tRoot.position;
        m_DoAttackFun(m_skillInfo, m_times);
        m_petState       = Pet1002State.stand;
        m_CurrentAction  = null;
        m_bGotoFirePos   = false;
        m_bGotoAttackPos = false;
    }
예제 #20
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);

        PlayAction(AnimatorState.Attack86000, m_Start);

        GameObject             gpos = m_Skin.ProPerty.gameObject;
        GameObjectActionExcute gae  = EffectM.LoadEffect(EffectM.sPath, "1402021_01", gpos.transform.position, gpos.transform);

        GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(3f);

        gae.AddAction(ndEffect);
        m_effectgo = gae.gameObject;
        GameObject posgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);

        if (posgo != null)
        {
            //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1000011",posgo.transform.position,1.5f);
            gae      = EffectM.LoadEffect(EffectM.sPath, "1000011", posgo.transform.position, BattleEnvironmentM.GetLifeMBornNode(true));
            ndEffect = new GameObjectActionDelayDestory(1.5f);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
            m_effectgo.transform.position += new Vector3(0, 0, -2);
        }
    }
예제 #21
0
    private void UpdateHpBG()
    {
        NGUIUtil.UpdateSpriteValue(MyHead.hpBG, MyHead.hpSprite.fillAmount, 0.3f);
        GameObjectActionExcute gae  = GameObjectActionExcute.CreateExcute(gameObject);
        GameObjectActionWait   wait = new GameObjectActionWait(0.3f, HideHpBG);

        gae.AddAction(wait);
    }
예제 #22
0
파일: Wall.cs 프로젝트: 741645596/batgame
    private void SetOpenDoor(object o)
    {
        m_Attr.DoorState = true;
        GameObjectActionExcute gae  = GameObjectActionExcute.CreateExcute(m_thisT.gameObject);
        GameObjectActionWait   wait = new GameObjectActionWait(2.5f, CloseDoor);

        gae.AddAction(wait);
    }
예제 #23
0
    public void AttachFx(string fx, string attachPoint, Vector3 localOffset, Vector3 localRotation, float duration)
    {
        GameObject                   goAttached = ProPerty.m_HelpPoint.GetVauleByKey(attachPoint);
        GameObjectActionExcute       gae        = EffectM.LoadEffect(fx, localOffset, localRotation, goAttached.transform);
        GameObjectActionDelayDestory ndEffect   = new GameObjectActionDelayDestory(duration);

        gae.AddAction(ndEffect);
    }
예제 #24
0
    public void AttachFxWorldCoord(string fx, string attachPoint, Vector3 offset, Vector3 rotation, float duration)
    {
        GameObject                   goAttached = ProPerty.m_HelpPoint.GetVauleByKey(attachPoint);
        GameObjectActionExcute       gae        = EffectM.LoadEffect(EffectM.sPath, fx, goAttached.transform.position, BattleEnvironmentM.GetLifeMBornNode(true));
        GameObjectActionDelayDestory ndEffect   = new GameObjectActionDelayDestory(duration);

        gae.AddAction(ndEffect);
    }
예제 #25
0
    public override void CollisionProcByFire(Collision collision, int Damage /*,Vector2 dir*/, ref FlyCollisionInfo Info, FlyDir flydir)
    {
        Role.WakeEnemy(this);
        Info.bVertical           = true;
        Info.bLeft               = true;
        Info.lifemCollision      = this;
        Info.FlyfallSTandGridPos = new Int2(StartUnit, Layer);
        SkillReleaseInfo sInfo = new SkillReleaseInfo();

        sInfo.m_InterruptSkill = false;
        sInfo.m_MakeStatus     = new List <StatusType> ();
        sInfo.m_bImmunity      = false;
        sInfo.m_Damage         = Damage;
        sInfo.Result           = AttackResult.Fire;
        ApplyDamage(sInfo, null);
        if (isDead)   //破了
        //GameObject go = SkillEffects._instance.LoadEffect("effect/prefab/", "1003021", MapGrid.GetMG(Info.FlyfallSTandGridPos).WorldPos, 1f);
        {
            GameObjectActionExcute     gae        = EffectM.LoadEffect(EffectM.sPath, "2000291", MapGrid.GetMG(Info.FlyfallSTandGridPos).WorldPos, BattleEnvironmentM.GetLifeMBornNode(true));
            GameObjectActionEffectInit effectinit = new GameObjectActionEffectInit();
            effectinit.SetRotation(new Vector3(0, 0, 90));
            gae.AddAction(effectinit);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
            gae.AddAction(ndEffect);
            //go.transform.Rotate(new Vector3(0,0,90),Space.Self);
            Info.flyCollisionAction = FlyCollisionAction.PauseContinueFlyDirectional;
            Info.bApplyDamage       = true;
            //EffectM.LoadEffect(EffectM.sPath, "zamen_02", transform.position, null);
        }
        else          //没破
        {
            shake();
            //GameObject go = SkillEffects._instance.LoadEffect("effect/prefab/", "1003011", MapGrid.GetMG(Info.FlyfallSTandGridPos).WorldPos, 1f);
            GameObjectActionExcute     gae        = EffectM.LoadEffect(EffectM.sPath, "2000281", MapGrid.GetMG(Info.FlyfallSTandGridPos).WorldPos, BattleEnvironmentM.GetLifeMBornNode(true));
            GameObjectActionEffectInit effectinit = new GameObjectActionEffectInit();
            effectinit.SetRotation(new Vector3(0, 0, 90));
            gae.AddAction(effectinit);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
            gae.AddAction(ndEffect);
            //go.transform.Rotate(new Vector3(0,0,90),Space.Self);
            if (m_DefenceColider.IsInRightCollider(collision.collider))
            {
                Info.flyCollisionAction = FlyCollisionAction.DropInBoat;
                Info.bApplyDamage       = false;
            }
            else if (m_DefenceColider.IsInLeftCollider(collision.collider))
            {
                Info.flyCollisionAction = FlyCollisionAction.DropInBoat;
                //设置左右板信息,并非移动方向
                Info.HitDir       = WalkDir.WALKLEFT;
                Info.bApplyDamage = false;
            }
            GameObjectActionExcute       gae1      = EffectM.LoadEffect(EffectM.sPath, "zamen_01", m_thisT.position, null);
            GameObjectActionDelayDestory ndEffect1 = new GameObjectActionDelayDestory(1f);
            gae1.AddAction(ndEffect1);
        }
    }
예제 #26
0
    protected void OnBomb(object o)
    {
        GameObject.Destroy(o as GameObject);
        Transform tTarget = m_Skill.PropSkillInfo.m_LifeTarget.m_thisT;
        GameObjectActionExcute       gaeTarget1919031 = EffectM.LoadEffect(EffectM.sPath, "1919031", m_posRole, tTarget);
        GameObjectActionDelayDestory ndEffect         = new GameObjectActionDelayDestory(1.0f);

        gaeTarget1919031.AddAction(ndEffect);
    }
예제 #27
0
    /// <summary>
    /// 显示/删除 状态特效
    /// </summary>
    /// <param name="type">眩晕、冰冻、压扁、击飞、麻痹、死亡</param>
    public void ShowStatusEffect(StatusType type, float duration)
    {
        if (CombatScheduler.State == CSState.End)
        {
            return;
        }
        string name = "";

        switch (type)
        {
        case StatusType.Vertigo:    //眩晕
            U3DUtil.DestroyAllChild(MyHead.StatusEffectParent, true);
            name = "2000691_02";
            break;

        case StatusType.IceBuild:    //冰冻
            U3DUtil.DestroyAllChild(MyHead.StatusEffectParent, true);
            name = "2000691_01";
            break;

        case StatusType.Squash:    //压扁
            U3DUtil.DestroyAllChild(MyHead.StatusEffectParent, true);
            name = "2000691_05";
            break;

        case StatusType.ClickFly:    //击飞
            U3DUtil.DestroyAllChild(MyHead.StatusEffectParent, true);
            name = "2000691_03";
            break;

        case StatusType.paralysis:    //麻痹
            U3DUtil.DestroyAllChild(MyHead.StatusEffectParent, true);
            name = "2000691_04";
            break;

        case StatusType.Die:    //死亡
            U3DUtil.DestroyAllChild(MyHead.StatusEffectParent, true);
            NGUIUtil.Change2DSpriteGray(m_soldierItem.MyHead.SprRolePhoto);
            break;

        case StatusType.None:
            U3DUtil.DestroyAllChild(MyHead.StatusEffectParent, true);
            break;

        default:

            break;
        }
        if (name != "")
        {
            GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", name, MyHead.StatusEffectParent.transform.position, MyHead.StatusEffectParent.transform);
            gae.gameObject.AddComponent <SetRenderQueue>();
            GameObjectActionDelayDestory delay = new GameObjectActionDelayDestory(duration);
            gae.AddAction(delay);
        }
    }
예제 #28
0
    public void ShowUpEffect(float duration)
    {
        GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "2000591_02", m_thisT.GetChild(0).position, m_thisT.GetChild(0));

        if (gae != null)
        {
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(duration);
            gae.AddAction(ndEffect);
        }
    }
예제 #29
0
    /// <summary>
    /// 使命召唤触发后的特效
    /// </summary>
    public void ShowSkill9001Effect()
    {
        GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "1000051_02", MyHead.soldierItem.transform.position, MyHead.soldierItem.transform);

        if (gae != null)
        {
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(2f);
            gae.AddAction(ndEffect);
        }
    }
예제 #30
0
    public override void Update()
    {
        base.Update();
        if (m_TimeCount < m_fDelay)
        {
            m_LifePrent.m_thisT.transform.position = start;
            return;
        }
        if (m_TimeCount < (m_fDelay + 3.02f))
        {
            if ((m_TimeCount - m_Delatime) <= m_fDelay)
            {
                SoundPlay.Play("back_ship", false, false);

                //SkillEffects._instance.LoadEffect("effect/prefab/", "2000201", start, 1.5f, dolphineDir);

                GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", m_effectName, start, null);
                if (gae != null)
                {
                    GameObjectActionEffectInit effectinit = new GameObjectActionEffectInit();
                    //effectinit.SetEffectMirror(dolphineDir);
                    gae.AddAction(effectinit);
                    GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.5f);
                    gae.AddAction(ndEffect);
                }
            }
            Vector3 pos    = bezier.GetPointAtTime((m_TimeCount - m_fDelay) / 3.0f);
            float   Angles = NdUtil.V2toAngle(pos, bezier.GetPointAtTime((m_TimeCount - m_fDelay) / 3.0f + 0.01f), Vector3.right) + 180;
            m_curangle = NdUtil.ClampAngle(Angles + 180, 0, 360f);
            //Debug.Log(m_curangle);
            if (m_bRotate)
            {
                if (dolphineDir == WalkDir.WALKRIGHT)
                {
                    m.SetAngle(-Angles);
                }
                else
                {
                    m.SetAngle(Angles);
                }
            }
            PlayAction(AnimatorState.Fly00000, pos, true);
            //NGUIUtil.DebugLog(m_TimeCount.ToString());
            //if (m_TimeCount >= 0.4f && m_TimeCount < 0.4f +Time.deltaTime)
            //{
            //    m_Skin.ProPerty.EnableTrail(true);
            //}
        }
        else
        {
            //PlayAction(AnimatorState.Fly00000, bezier.GetPointAtTime(1), true);
            //MoveAction(AnimatorState.Fly00000, Vector3.down * m_LifePrent.m_Attr.Flyspeed * Time.deltaTime, ActionMode.Delta);
            MoveAction(AnimatorState.Fly00000, Vector3.down * 10 * Time.deltaTime, ActionMode.Delta);
        }
    }