Exemplo n.º 1
0
    public void SetInfo(Vector3 dest, DoAttackFun fun, float speed, WalkDir dir, BulletType t, SoldierSkill skill, bool isPlaySound = true)
    {
        m_dir           = dir;
        m_Skill         = false;
        m_skillinfo     = skill;
        m_Start         = transform.localPosition;
        m_Start.z       = -0.5f;
        m_Destination   = dest;
        m_Destination.z = -0.5f;
        //m_Destination.y = m_Start.y;
        m_fun      = fun;
        m_Speed    = speed;
        m_Duration = Mathf.Abs(transform.localPosition.x - m_Destination.x) / speed;
        m_type     = t;
        //effect = SkillEffects._instance.LoadEffect("effect/prefab/", "1002011",transform.position,0.5f);



        if (isPlaySound)
        {
            SoundPlay.Play("fireGun", false, false);
        }
        m_info = m_skillinfo.m_skilleffectinfo;

        /*if (t == BulletType.Grenade || t == BulletType.Snowball|| t == BulletType.Poison || t == BulletType.ling)
         * {
         *      //m_Destination.y -= 1f;
         *      myBezier = new Bezier( m_Start,  new Vector3(0,-3,0),  new Vector3(0,-3,0), m_Destination );
         * }
         *
         * if (t == BulletType.Grenade || t == BulletType.Snowball|| t == BulletType.Poison )
         * {
         *      //m_Destination.y -= 1f;
         *      myBezier = new Bezier( m_Start,  new Vector3(0,-3,0),  new Vector3(0,-3,0), m_Destination );
         * }
         * if (t == BulletType.ling)
         * {
         *      //m_Destination.y -= 1f;
         *      m_Destination.y = m_Start.y;
         *      myBezier = new Bezier( m_Start,  new Vector3(0,-2,0),  new Vector3(0,-2,0), m_Destination );
         * }*/

        if (skill.m_type == 1005)
        {
            float   dis = m_Destination.x - m_Start.x;
            Vector3 pos = m_Destination;
            pos.x    = m_Start.x + dis * 0.7f;
            myBezier = new Bezier(m_Start, new Vector3(0, -m_info.m_locus, 0), new Vector3(0, -m_info.m_locus, 0), pos);
            Vector3 pos1 = pos;
            pos1.x   += dis * 0.2f;
            myBezier1 = new Bezier(pos, new Vector3(0, -m_info.m_locus * 0.4f, 0), new Vector3(0, -m_info.m_locus * 0.4f, 0), pos1);
            myBezier2 = new Bezier(pos1, new Vector3(0, -m_info.m_locus * 0.2f, 0), new Vector3(0, -m_info.m_locus * 0.2f, 0), m_Destination);
        }
        else
        {
            myBezier = new Bezier(m_Start, new Vector3(0, -m_info.m_locus, 0), new Vector3(0, -m_info.m_locus, 0), m_Destination);
        }

        //Debug.Log("bullet:" + transform.localPosition + ","  +m_Destination + "," + m_Speed + "," + m_Duration + ","+Mathf.Abs(transform.localPosition.x - m_Destination.x));
    }
Exemplo n.º 2
0
    public override void BuildUpdate()
    {
        base.BuildUpdate();
        m_vCurGreed = m_vDirGreed;
        Pao.transform.localRotation = Quaternion.Euler(m_vCurGreed);
        if (Time.time - m_fCheckRoleInSmallCirle > 0.2f)
        {
            List <Life> RoleList    = new List <Life>();
            List <Life> newRoleList = new List <Life>();
            CM.SearchLifeMList(ref RoleList, null, LifeMType.SOLDIER /*| LifeMType.PET*/, LifeMCamp.ALL, MapSearchStlye.Circle, this, (MapGrid.m_width * 150) / MapGrid.m_Pixel);
            if (RoleList.Count > 0)
            {
                (m_Property as BuildProperty).SetColor("_Color", new Color(1.0f, 1.0f, 1.0f, 0.196f));
            }
            else
            {
                (m_Property as BuildProperty).SetColor("_Color", new Color(1.0f, 1.0f, 1.0f, 1.0f));
            }
        }
        if (m_bAttack && Time.time - m_fAttackTime > 0.5f)
        {
            m_bAttack = false;
            SoundPlay.Play("trap_cannon_land", false, false);
            ActiveEffect1915011(false);

            SetAnimator(Build_AnimatorState.Stand10000);
        }
    }
Exemplo n.º 3
0
    public override void BuildUpdate()
    {
        base.BuildUpdate();

        if (m_bBomb == true && Time.time - m_fAttackTrigger > 0.5f)
        {
            if (m_playSound == true)
            {
                m_playSound = false;
                SoundPlay.Play("trap_boomroom", false, false);
            }
            //SetAnimator (Build_AnimatorState.Trigger30000);
        }
        if (m_bBomb == true && GetCDTime() < 0.6f)
        {
            (m_Property as BuildProperty).EnableAllBodyRender(true);
            SetAnimator(Build_AnimatorState.Stand10000);

            m_goEffect1003031.SetActive(false);
            m_playSound = true;
            m_bBomb     = false;
        }
        if (m_bHitFly == true && GetCDTime() < 0.6f)
        {
            (m_Property as BuildProperty).EnableAllBodyRender(true);
            SetAnimator(Build_AnimatorState.Stand10000);
            m_goEffect1003031.SetActive(false);
            m_bHitFly = false;
        }
    }
Exemplo n.º 4
0
    /// <summary>
    /// 释放技能主逻辑
    /// </summary>
    protected override bool ReleaseSkill(ref List <Life> RoleList, ref int nAttackIndex)
    {
        m_RoleList.Clear();
        bool IsRelease = false;

        if (RoleList.Count > 0)
        {
            IsRelease = true;
            foreach (Life w in RoleList)
            {
                m_RoleList.Add(w);
                GridActionCmd action = null;
                if (w is Role)
                {
                    action = (w as Role).CurrentAction;
                }
                SkillReleaseInfo Info = m_Skill.SkillRelease(this, w, action, m_Skill.PropSkillInfo);
                w.ApplyDamage(Info, m_thisT);
            }
            m_fAttackTrigger = Time.time;
            m_bBomb          = true;
            SoundPlay.Play("littleboom", false, false);
            SetAnimator(Build_AnimatorState.Trigger30000);
            m_goEffect1003031.SetActive(true);
        }
        return(IsRelease);
    }
Exemplo n.º 5
0
    SoundPlay PlaySoundInternal(AudioClip clip, float time)
    {
        if (clip == null
#if !SH_ASSETBUNDLE
            || ConfigData.Instance.UseSound == false || ConfigData.Instance.IsMute == true
#endif
            )
        {
            return(null);
        }

        AudioSource source = GetFreeSource(clip);
        if (time > 0f)
        {
            source.PlayDelayed(time);
        }
        else
        {
            source.Play();
            if (time < 0f)
            {
                source.time = -time;
            }
        }

        SoundPlay play = new SoundPlay();
        play.sources.Add(source);

        return(play);
    }
Exemplo n.º 6
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);
    }
Exemplo n.º 7
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);

        PlayAction(AnimatorState.Attack85000, m_Start);
        SoundPlay.Play("atc_xiaobai", false, false);
    }
Exemplo n.º 8
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);

        PlayAction(AnimatorState.Attack81000, m_Start);
        SoundPlay.Play("skill_naixiong", false, false);
    }
Exemplo n.º 9
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;
            }
        }
    }
Exemplo n.º 10
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);
    }
Exemplo n.º 11
0
    protected override void TriggerSkillTime(ref List <Life> RoleList, ref float fReleaseDelay)
    {
        fReleaseDelay = 0.25f;
        bool IsRelease = false;

        if (RoleList.Count > 0)
        {
            SetAnimator(Build_AnimatorState.Trigger30000);
            {
                Life    w       = RoleList[0];
                Vector3 posSrc  = m_goPao.transform.position;
                Vector3 posRole = new Vector3(w.GetPos().x, w.GetPos().y, w.GetPos().z);
                float   fgreed  = NdUtil.V2toAngle(posSrc, posRole, Vector3.right);
                if (fgreed < 0f || fgreed > 270)
                {
                    fgreed = 0f;
                }
                else if (fgreed > 180f)
                {
                    fgreed = 180f;
                }
                m_vDirGreed = new Vector3(0, -fgreed, 0);
            }
            m_bAttack     = true;
            m_fAttackTime = Time.time;
            m_goEffect1912011.SetActive(true);
            SoundPlay.Play("trap_cannon_sky", false, false);
        }
    }
Exemplo n.º 12
0
    public override void Start()
    {
        base.Start();
        if (m_type == ResourceType.Wood)
        {
            SoundPlay.Play("battle_wood_pick", false, false);
        }
        else if (m_type == ResourceType.Gold)
        {
            SoundPlay.Play("gold", false, false);
        }

        //m_fShowEffectCounter = 0.4f;
        Vector3       pos = Vector3.zero;
        CombatInfoWnd Wnd = WndManager.FindDialog <CombatInfoWnd>();

        if (Wnd != null)
        {
            pos = m_uicamera.WorldToViewportPoint(Wnd.GetResourcePos(m_type).position);
        }
        pos.z = 20;//Mathf.Abs(m_target.transform.position.z - m_gameCamera.transform.position.z) * 0.5f;
        pos   = m_gameCamera.ViewportToWorldPoint(pos);
        m_end = m_gameCamera.transform.InverseTransformPoint(pos);
        m_target.transform.parent = m_gameCamera.transform;
        m_start = m_target.transform.localPosition;
        m_target.transform.localScale = Vector3.one;
        EffectCamera.RemoveFollowList(m_target.transform);
    }
Exemplo n.º 13
0
    void GoCombat()
    {
        SoundPlay.PlayBackGroundSound("bgm_battle_loop", true, false);
        List <int>         l           = new List <int>();
        List <int>         lDefense    = new List <int>();
        List <SoldierInfo> soldierList = new List <SoldierInfo>();

        foreach (var i in m_SelectedSoldier)
        {
            soldierList.Add(SoldierDC.GetSoldiers(i.Soldier.ID));
            l.Add(i.Soldier.ID);
            lDefense.Add(i.Soldier.SoldierTypeID);
        }

        CmCarbon.SetAttackSoldier(soldierList);
        if (BattleEnvironmentM.GetBattleEnvironmentMode() == BattleEnvironmentMode.CombatPVE)
        {
            /*if (StageDC.GetPveMode() == PVEMode.Defense) {
             *  StageDC.SendStageAttackRequest(StageDC.GetCompaignStageID(), lDefense, 0);
             * } else {
             *  StageDC.SendStageAttackRequest(StageDC.GetCompaignStageID(), l, m_SelectedBlackScienceDataID);
             * }
             * DataCenter.RegisterHooks((int)gate.Command.CMD.CMD_702, CanCombat);*/
            JoinCombat();
        }
        else
        {
            JoinCombat();
        }
    }
Exemplo n.º 14
0
    void Start()
    {
        Screen.SetResolution(1024, 640, false);
        string tangramColor = PlayerPrefs.GetString("tangramColor", "0");

        TangramAA = GameObject.Find("Main Camera").GetComponent <TangramAutomaticAdjustment> ();
        if (GameObject.Find("Canvas").GetComponent <UI_TangramAssemble> () != null)
        {
            TangramUI = GameObject.Find("Canvas").GetComponent <UI_TangramAssemble> ();
        }
        soundPlay = GameObject.Find("Audio_Source").GetComponent <SoundPlay> ();
        gamedata  = GameObject.Find("Data_Source").GetComponent <GameData> ();
        tn [0]    = "Tangram_" + tangramColor + "_00";
        tg [0]    = Instantiate(Resources.Load("Prefabs/Tangrams/Tangrams_" + tangramColor + "/" + tn [0])) as GameObject;
        tg [0].transform.position = gamedata.tangramPosition [0];
        tn [0] = tn [0] + "(Clone)";
        // 动态创建七巧板并设置坐标(tangramname and tangramposition)
        for (int i = 1; i < 8; i++)
        {
            tn [i] = "Tangram_" + tangramColor + "_0" + i.ToString();
            tg [i] = Instantiate(Resources.Load("Prefabs/Tangrams/Tangrams_" + tangramColor + "/" + tn [i])) as GameObject;
            tg [i].transform.position = gamedata.tangramPosition [i];
            tn [i] = tn [i] + "(Clone)";
            // 动态添加事件注册脚本
//			tg [i].AddComponent<TangramListener>();
        }
    }
Exemplo n.º 15
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);
        }
    }
Exemplo n.º 16
0
    void Start()
    {
        _audioSource = this.gameObject.GetComponent <AudioSource> ();
        _soundEffect = this.gameObject.GetComponents <AudioSource> ();
        //音量大小
        _audioSource.volume = 0.5f;

        //循环播放
        _audioSource.loop = true;

        //脚本单例
        _soundPlay = this;

        /*
         * //跳转场景,不销毁物体自身
         * DontDestroyOnLoad(this.gameObject);
         * _soundPlay = this;
         * //在摄像机中添加AudioSource组件
         * _audioSource=this.gameObject.AddComponent<AudioSource>();
         * _audioSource.playOnAwake = true;
         * //循环播放
         * _audioSource.loop=true;
         * //设置音量为最大,区间在0-1之间
         * _audioSource.volume=1.0f;
         * //设置audioclip
         * //PlayBgmAudio(0);
         */
        PlayMusic("start");
    }
Exemplo n.º 17
0
 /// <summary>
 /// 资源卸载
 /// </summary>
 public override void Clear()
 {
     SoundPlay.PlayBackGroundSound("bgm_city_loop", true, false);
     MapM.ClearMap();
     CM.ExitCm();
     ShipBombRule.ClearBombData();
     WndManager.DestroyAllDialogs();
 }
Exemplo n.º 18
0
    /// <summary>
    /// 播放炮弹兵发送的音乐
    /// </summary>
    private static void PlayFlyMusic(int roleID)
    {
        bool soundExit = SoundPlay.Play(roleID.ToString() + "_fly", false, false);

        if (!soundExit)
        {
            SoundPlay.Play("fly", false, false);
        }
    }
Exemplo n.º 19
0
 /// <summary>
 /// 构建世界空间
 /// </summary>
 public override void BuildWorld()
 {
     Life.Environment = LifeEnvironment.View;
     SoundPlay.PlayBackGroundSound("bgm_city_loop", true, true);
     MainCameraM.s_Instance.ResetCameraDataByHaven();
     MainCameraM.s_Instance.SetCameraLimitParam(MainCameraM.s_reaLimitPyramidHavenView);
     RevertFrCamPosTemp(false);
     MainCameraM.s_Instance.EnableDrag(true);
 }
Exemplo n.º 20
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);
        }
    }
Exemplo n.º 21
0
 virtual public void Finish()
 {
     if (particle_system != null)
     {
         GameObject.Destroy(particle_system.gameObject);
         particle_system = null;
     }
     if (sound_play != null)
     {
         sound_play.Finish();
         sound_play = null;
     }
 }
Exemplo n.º 22
0
    /// <summary>
    /// 释放技能主逻辑
    /// </summary>
    protected override bool ReleaseSkill(ref List <Life> RoleList, ref int nAttackIndex)
    {
        bool IsRelease = false;

        if (RoleList.Count > 0)
        {
            m_bCDOver = false;

            m_fAttackTimer = Time.time;

            IsRelease = true;
            bool ispress = true;            //是否可以压扁

            /*{
             *      foreach(Life life in RoleList)
             *      {
             *              if (life.m_Attr.AntiPress > 100)
             *              {
             *                      ispress = false;
             *                      GridActionCmd action = null;
             *                      if (life is Role)
             *                              action = (life as Role).CurrentAction;
             *                      SkillReleaseInfo Info = m_Skill.SkillRelease(this,life,action,m_Skill.PropSkillInfo);
             *                      //life.ApplyDamage(Info, transform);
             *                      SetAnimator (Build_AnimatorState.Trigger30100);
             *                      m_bAttackedToDie=true;
             *              }
             *      }
             * }*/
            if (ispress)
            {
                foreach (Life lifepress in RoleList)
                {
                    GridActionCmd action = null;
                    if (lifepress is Role)
                    {
                        action = (lifepress as Role).CurrentAction;
                    }
                    SkillReleaseInfo Info = m_Skill.SkillRelease(this, lifepress, action, m_Skill.PropSkillInfo);
                    lifepress.ApplyDamage(Info, m_thisT);
                }
                SetAnimator(Build_AnimatorState.Trigger30000);
                m_bAttacke = true;

                SoundPlay.Play("Trap/trap_flattening", false, false);
                m_goEffect1914021.SetActive(true);
            }
        }
        return(IsRelease);
    }
        public RemoteControl()
        {
            InitializeComponent();

            cmbRate.Text = (string) cmbRate.Items[0];
            cmbChannels.Text = (string)cmbChannels.Items[0];

            sndplay = new SoundPlay();

            for (int i = 0; i < 8; ++i)
            {
                sndplay.PPMchannels[i] = 100;
            }
        }
Exemplo n.º 24
0
    void ClickCombat(UIButton sender)
    {
        CounterPartInfo Info = StageDC.GetCounterPartInfo();

        if (Info == null)
        {
            return;
        }
        if (m_type != StageType.Normal)
        {
            int Times = StageDC.GetPassStageTimes(m_type, m_stageid);
            if (Times >= Info.times)
            {
                NGUIUtil.ShowTipWndByKey("88800031", 2);
                return;
            }
        }
        if (StageDC.GetPveMode() == PVEMode.Defense)
        {
            SoundPlay.PlayBackGroundSound("bgm_battle_loop", true, false);
            ShipCanvasInfo     Canvas   = new ShipCanvasInfo();
            List <SoldierInfo> lSoldier = new List <SoldierInfo>();
            List <ShipPutInfo> lBuild   = new List <ShipPutInfo>();
            ShipPlanDC.SetCurShipPlan(PlanType.Default);
            ShipPlan Plan = ShipPlanDC.GetCurShipPlan();
            Plan.GetShipCansInfoPlan(ref Canvas, ref lSoldier, ref lBuild);
            CmCarbon.SetDefenseMap(Canvas);
            CmCarbon.SetDefenseBuild(lBuild);
            CmCarbon.SetDefenseSoldier(lSoldier);
            CmCarbon.SetDefenseFloor(UserDC.GetDeckLevel());
            CmCarbon.SetDefenseUserInfo(Info, null);
            List <int> l = new List <int>();
            foreach (SoldierInfo s in lSoldier)
            {
                l.Add(s.ID);
            }
            sender.enabled = false;
            //DataCenter.RegisterHooks((int)gate.Command.CMD.CMD_702, CanCombat);
            //StageDC.SendStageAttackRequest(m_stageid, l, 0);
            SceneM.Load(CombatScene.GetSceneName(), false, false);
        }
        else
        {
            sender.enabled = false;
            //SoldierDC.Send_SoldierBattleListRequest(0);
            //DataCenter.RegisterHooks((int)gate.Command.CMD.CMD_214, LoadStage);
            SceneM.Load(CombatScene.GetSceneName(), false, false);
        }
    }
Exemplo n.º 25
0
    public override void ActiiveStart()
    {
        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, "1004031_01", posgo.transform.position, posgo.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.5f);
            gae.AddAction(ndEffect);

            SoundPlay.Play("skill_xiaobai", false, false);
        }
    }
Exemplo n.º 26
0
    public override void StartWithTarget(Life Parent)
    {
        base.StartWithTarget(Parent);
        SoundPlay.Play("skill_biochemical_boss", false, false);
        m_LifePrent.m_thisT.position += new Vector3(0, 0, -1.5f);
        GameObject posgo = m_LifePrent.GetSkin().ProPerty.HelpPoint.GetVauleByKey(HelpPointName.Bone1Pos);

        if (posgo != null)
        {
            Vector3 pos = posgo.transform.position;
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1401141", pos, posgo.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(m_Duration);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
        }
    }
Exemplo n.º 27
0
    //-------------------------
    void OnTriggerEnter(Collider Col)
    {
        //If player collected coin, then destroy object
        if (Col.CompareTag("Player"))
        {
            SoundPlay.PlaySound();
            Destroy(gameObject);
            Timer.CountDown = Timer.CountDown + 10;
        }

        else
        {
            Debug.Log("ROAR");
            transform.position = new Vector3(Random.Range(-120.0F, 3.0F), 1, Random.Range(-30.0F, 30.0F));
        }
    }
Exemplo n.º 28
0
    public override void ActiiveStart()
    {
        SoundPlay.Play("skill_viking", false, false);

        GameObject gpos = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);
        string     name = "1104061_01";

        if (m_LifePrent.WalkDir == WalkDir.WALKRIGHT)
        {
            name = "1104061_02";
        }
        GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, name, gpos.transform.position, gpos.transform);
        GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(180.0f);

        m_effectgo = gae.gameObject;
    }
Exemplo n.º 29
0
    /// <summary>
    /// 升级特效
    /// </summary>
    public void UpLevelEffect()
    {
        Vector3 pos = new Vector3(0, -10, ConstantData.iDepBefore3DModel);
        GameObjectActionExcute gae = EffectM.LoadEffect("effect/prefab/", "2000711",
                                                        pos, MyHead.SoldierPos);

        gae.gameObject.AddComponent <SetRenderQueue>();

        if (gae != null)
        {
            GameObjectLoader.SetGameObjectLayer(gae.gameObject, MyHead.SoldierPos.gameObject.layer);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.8f);
            gae.AddAction(ndEffect);
            gae.gameObject.transform.localPosition = pos;
        }
        SoundPlay.Play("hero_promotion", false, false);
    }
Exemplo n.º 30
0
    public override void ActiiveStart()
    {
        SoundPlay.Play("skill_voice_rui", false, false);
        Life w = m_LifePrent.m_Skill.m_SkillTarget;

        if (w is Role)
        {
            //Transform EffectPos = (w as Role).m_Skin.ProPerty.m_EffectPos;
            GameObject posgo = (w as Role).m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectPos);
            if (posgo != null)
            {
                Vector3 pos = posgo.transform.position;
                pos.z = -1.5f;
                //SkillEffects._instance.LoadEffect("effect/prefab/", "1002051",pos,1f);
                GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1002051", pos, BattleEnvironmentM.GetLifeMBornNode(true));
                GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
                gae.AddAction(ndEffect);
            }
        }
        else
        {
            MapGrid g   = w.GetMapGrid();
            Vector3 pos = g.WorldPos;
            pos.y += 1f;

            //SkillEffects._instance.LoadEffect("effect/prefab/", "1002051",pos,1f);
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1002051", pos, BattleEnvironmentM.GetLifeMBornNode(true));
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
            gae.AddAction(ndEffect);
        }
        GameObject pgo = m_Skin.ProPerty.HelpPoint.GetVauleByKey(HelpPointName.EffectBottomPos);

        if (pgo != null)
        {
            //m_effectgo = SkillEffects._instance.LoadEffect("effect/prefab/", "1002031",posgo.transform.position,m_Duration);
            string name = "1002151_0";
            if (!m_LifePrent.m_Core.m_IsPlayer)
            {
                name = "1002151_1";
            }
            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, name, pgo.transform.position, m_LifePrent.GetSkin().ProPerty.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1.5f);
            gae.AddAction(ndEffect);
        }
        SoundPlay.Play("missile_ready", false, false);
    }
Exemplo n.º 31
0
    public override void StartWithTarget(Life Parent, StartAttackFun StartAttack)
    {
        base.StartWithTarget(Parent, StartAttack);

        PlayAction(AnimatorState.Attack85000, m_Start);
        SoundPlay.Play("atc_hulk_02", 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, "1401031", pos, posgo.transform);
            GameObjectActionDelayDestory ndEffect = new GameObjectActionDelayDestory(1f);
            gae.AddAction(ndEffect);
            m_effectgo = gae.gameObject;
        }
    }