示例#1
0
    void Reward(int id)
    {
        if (_CurrentID == _777Index)
        {
            BCSoundPlayer.Play(MusicEnum.tiger777);
        }

        TigerInfo tiger = _szTigerInfo[id];

        WGAchievementManager.Self.processAchievement(tiger.ID, DTAchievementType.TIGER_ID);

        int _tempType   = tiger.RewardType;
        int _tempParam1 = tiger.Parameter1;
        int _tempParam2 = tiger.Parameter2;

        switch (_tempType)
        {
        case 0:
            return;

        case 1:
            _shareWorld.AddCoin(_tempParam1, _tempParam2, true);
            break;

        case 4:
        {
            _shareWorld.AddPackage(_tempParam1, true);
        }
        break;

        case 3:
            WGTigerSkillEffect.Self.ShowSkillEffectWithSKid(_tempParam1);
            WGSkillController.Instance.ReleaseSkillWithID(_tempParam1);

            break;

        case 5:
            break;
        }
    }
示例#2
0
    public void WhenBearHurted(int id)
    {
        //Debug.Log("whenbear hurted");
        BCSoundPlayer.Play(MusicEnum.hitBear);
        if (WGHelpManager.Self != null)
        {
            if (WGHelpManager.Self.enabled)
            {
                if (!WGHelpManager.Self.StatesIsEnd(EMHelpStates.Kill_Drop))
                {
                    WGHelpManager.Self.ShowHelpView(EMHelpStates.Kill_Drop);
                }
                else if (!WGHelpManager.Self.StatesIsEnd(EMHelpStates.Kill_Fast))
                {
                    WGHelpManager.Self.ShowHelpView(EMHelpStates.Kill_Fast);
                }
                else if (!WGHelpManager.Self.StatesIsEnd(EMHelpStates.LongTouch))
                {
                    WGHelpManager.Self.ShowHelpView(EMHelpStates.LongTouch);
                }
                else if (!WGHelpManager.Self.StatesIsEnd(EMHelpStates.Use_Weapon))
                {
                    WGHelpManager.Self.ShowHelpView(EMHelpStates.Use_Weapon);
                }
                else if (!WGHelpManager.Self.StatesIsEnd(EMHelpStates.Free10_Skill))
                {
                    WGHelpManager.Self.ShowHelpView(EMHelpStates.Free10_Skill);
                }
            }
        }
        WGAchievementManager.Self.processAchievement(id, DTAchievementType.HIT_ALL);
        WGAchievementManager.Self.processAchievement(id, DTAchievementType.HIT_ONE);
        int addNum = Random.Range(2, 5);
        int coinID = Random.Range(0, 4);

        if (id == WGDefine.BossID || id == WGDefine.PayBear1 || id == WGDefine.PayBear2)
        {
            _ShareWorld.AddCoin(WGDefine.CommonCoin + coinID, addNum);
        }
    }