Пример #1
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);
            }
        }
    }
Пример #2
0
    public void ReleaseGodSkill(MapGrid g, Vector3 pos)
    {
        m_ReleaseTimes++;
        m_targetg   = g;
        m_targetpos = pos;

        if (m_godskill.m_type == 9000)
        {
            GameObjectActionExcute gae = EffectM.LoadEffect(EffectM.sPath, "1000041_01", EffectCamera.GetEffectPos(pos), BattleEnvironmentM.GetLifeMBornNode(true));
            EffectCamera.AddFollowList(gae.transform, pos);
            //gae.gameObject.transform.localPosition = new Vector3(gae.gameObject.transform.localPosition.x,gae.gameObject.transform.localPosition.y,gae.gameObject.transform.localPosition.z-1f);
            GameObjectActionGodSkill9000 ndEffect = new GameObjectActionGodSkill9000();
            ndEffect.SetData(DoGodSkill, m_godskill.m_blackscreentime);
            //ndEffect.m_complete = DoGodSkill;
            SoundPlay.Play("apocalypse_missile_01", false, false);
            SoundPlay.JoinPlayQueue("apocalypse_missile_02", 0f);
            SoundPlay.JoinPlayQueue("apocalypse_missile_03", 0.0f);
            gae.AddAction(ndEffect);
        }
        else if (m_godskill.m_type == 9001)
        {
            //NGUIUtil.DebugLog("使命召唤表现");


            GameObjectActionExcute       gae      = EffectM.LoadEffect(EffectM.sPath, "1000051_01", EffectCamera.GetEffectPos(pos), BattleEnvironmentM.GetLifeMBornNode(true));
            GameObjectActionGodSkill9001 ndEffect = new GameObjectActionGodSkill9001();
            ndEffect.SetData(DoGodSkill, m_godskill.m_blackscreentime);
            if (m_listSkillTarget.Count > 0)
            {
                Life lifeTarget = m_listSkillTarget[0];
                ndEffect.SkillTarget = lifeTarget;
            }
            SoundPlay.Play("call_of_duty", false, false);
            gae.AddAction(ndEffect);
        }
        else if (m_godskill.m_type == 9002)
        {
            DoGodSkill();
        }
    }