Exemplo n.º 1
0
    public void PlayUnsealChestEffect(Vector3 destGUIPos, EffectEndDelegate endDel)
    {
        StartCoroutine(Create2DPackedEffect(UnsealChestPrefab, destGUIPos,
                                            UnsealChestPrefab.GetCurAnim().GetLength() + 0.2f, endDel));

        Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/OpenChest");
    }
Exemplo n.º 2
0
 public void PlayTaskEffect(bool receive, EffectEndDelegate endDel)
 {
     if (receive)
     {
         //NewEffectFont.Show(NewEffectFont.EffectType.JieShouRenWu,endDel);
         Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/GetTask");
     }
     else
     {
         NewEffectFont.Show(NewEffectFont.EffectType.WanChengRenWu, endDel);
         Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/Success");
     }
 }
Exemplo n.º 3
0
    public void PlaySneakEffect(GameData.BattleGameData.BattleResult battleResult, EffectEndDelegate endDel)
    {
        NewEffectFont.EffectType type;
        if (battleResult.SneakAttackType == GameData.BattleGameData.SneakAttackType.ROLE_ATTACK)
        {
            type = NewEffectFont.EffectType.TouXiChengGong;
            Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/BattleWin");
        }
        else if (battleResult.SneakAttackType == GameData.BattleGameData.SneakAttackType.NPC_ATTACK)
        {
            type = NewEffectFont.EffectType.BeiTouXi;
            Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/BattleFail");
        }
        else
        {
            return;
        }

        NewEffectFont.Show(type, endDel);
    }
Exemplo n.º 4
0
    public void PlayBattleEffect(GameData.BattleGameData.BattleResult battleResult, EffectEndDelegate endDel)
    {
        NewEffectFont.EffectType type;
        if (battleResult.BattleWinResult == GameData.BattleGameData.EBattleWinResult.ACTOR_WIN)
        {
            type = NewEffectFont.EffectType.ZhanDouShengLi;
            Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/BattleWin");
        }
        else if (battleResult.BattleWinResult == GameData.BattleGameData.EBattleWinResult.MONSTER_WIN)
        {
            type = NewEffectFont.EffectType.ZhanDouShiBai;
            Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/BattleFail");
        }
        else
        {
            type = NewEffectFont.EffectType.ZhanDouPingJu;
            Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/BattleDraw");
        }

        NewEffectFont.Show(type, endDel);
    }
Exemplo n.º 5
0
    public void PlayRankUpEffect(Vector3 destGUIPos, EffectEndDelegate endDel)
    {
        NewEffectFont.Show(NewEffectFont.EffectType.JunXianTiSheng, endDel);

        Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/LeverUp");
    }
Exemplo n.º 6
0
    public void PlayExplorePlaceEffect(EffectEndDelegate endDel)
    {
        NewEffectFont.Show(NewEffectFont.EffectType.DengJiTiSheng, endDel);

        Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/LeverUp");
    }
Exemplo n.º 7
0
    IEnumerator Create2DPackedEffect(PackedSprite prefab, Vector3 guiPos, float length, EffectEndDelegate endDel = null)
    {
        PackedSprite sprite = Instantiate(prefab) as PackedSprite;

        sprite.gameObject.name      = "UI3DItem" + _mEZ3DObjList.Count;
        sprite.transform.parent     = EZ3DItemParent;
        sprite.transform.localScale = Vector3.one;

        guiPos.x *= Globals.Instance.M3DItemManager.EZ3DItemParentScaleInv.x;
        guiPos.y *= Globals.Instance.M3DItemManager.EZ3DItemParentScaleInv.y;
        sprite.transform.localPosition = new Vector3(guiPos.x, guiPos.y, GUIManager.GUI_NEAREST_Z);
        sprite.PlayAnim(0);

        LayerMaskDefine.SetLayerRecursively(sprite.gameObject, LayerMaskDefine.GUI);

        yield return(new WaitForSeconds(length));

        if (null != endDel)
        {
            endDel();
        }

        Destroy(sprite.gameObject);
    }