예제 #1
0
    public override void SetData(CutsceneDataBase data)
    {
        CutsceneDataFusion cutsceneDataFusion = data as CutsceneDataFusion;

        if (cutsceneDataFusion != null)
        {
            base.transform.localPosition = new Vector3(0f, 10f, 0f);
            this.endCallback             = cutsceneDataFusion.endCallback;
            this.allSkipButton.Initialize();
            this.allSkipButton.AddAction(new Action(this.EndCutscene));
            this.touchScreenButton.Initialize();
            this.touchScreenButton.AddAction(new Action(this.EndCutscene));
            GameObject gameObject = CutsceneCommon.LoadMonsterModel(base.transform, cutsceneDataFusion.baseModelId);
            gameObject.transform.localPosition = new Vector3(-1.5f, 0f, 0f);
            GameObject gameObject2 = CutsceneCommon.LoadMonsterModel(base.transform, cutsceneDataFusion.materialModelId);
            gameObject2.transform.localPosition = new Vector3(1.5f, 0f, 0f);
            CharacterParams component = gameObject.GetComponent <CharacterParams>();
            component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
            component = gameObject2.GetComponent <CharacterParams>();
            component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
            GameObject gameObject3 = CutsceneCommon.LoadMonsterModel(base.transform, cutsceneDataFusion.eggModelId);
            gameObject3.transform.localPosition = Vector3.zero;
            gameObject3.SetActive(false);
            CutsceneCommon.SetBillBoardCamera(gameObject, this.mainCamera);
            CutsceneCommon.SetBillBoardCamera(gameObject2, this.mainCamera);
            this.scriptAnime.Initialize(this.cutsceneSound, base.transform.position, gameObject, gameObject2, gameObject3, cutsceneDataFusion.upArousal, this.allSkipButton.gameObject);
        }
    }
예제 #2
0
    protected override void EndSuccess()
    {
        int  num = int.Parse(this.baseDigimon.userMonster.friendship);
        int  friendshipMaxValue = MonsterFriendshipData.GetFriendshipMaxValue(this.baseDigimon.monsterMG.growStep);
        bool isArousal          = num >= friendshipMaxValue;
        bool isResetEquipChip   = false;

        if (this.baseDigimon.GetChipEquip().IsAttachedChip())
        {
            isResetEquipChip = true;
            base.RemoveEquipChip(false, this.baseDigimon.userMonster.userMonsterId);
        }
        if (this.partnerDigimon.GetChipEquip().IsAttachedChip())
        {
            isResetEquipChip = true;
            base.RemoveEquipChip(false, this.partnerDigimon.userMonster.userMonsterId);
        }
        string[] userMonsterIdList = new string[]
        {
            this.baseDigimon.userMonster.userMonsterId,
            this.partnerDigimon.userMonster.userMonsterId
        };
        ClassSingleton <MonsterUserDataMng> .Instance.DeleteUserMonsterData(userMonsterIdList);

        GooglePlayGamesTool.Instance.Laboratory();
        ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(MonsterDataMng.Instance().GetMonsterDataList());

        GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonsterData = this.GetUserMonsterData();
        MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userMonsterData.userMonsterId);

        CutsceneDataFusion cutsceneDataFusion = new CutsceneDataFusion();

        cutsceneDataFusion.path            = "Cutscenes/Fusion";
        cutsceneDataFusion.baseModelId     = this.baseDigimon.GetMonsterMaster().Group.modelId;
        cutsceneDataFusion.materialModelId = this.partnerDigimon.GetMonsterMaster().Group.modelId;
        cutsceneDataFusion.eggModelId      = ClassSingleton <EvolutionData> .Instance.GetEggType(userMonster.userMonster.monsterEvolutionRouteId);

        cutsceneDataFusion.upArousal = isArousal;
        CutsceneDataFusion cutsceneDataFusion2 = cutsceneDataFusion;

        if (CMD_Laboratory.< > f__mg$cache1 == null)
        {
            CMD_Laboratory.< > f__mg$cache1 = new Action(CutSceneMain.FadeReqCutSceneEnd);
        }
        cutsceneDataFusion2.endCallback = CMD_Laboratory.< > f__mg$cache1;
        CutsceneDataFusion cutsceneData = cutsceneDataFusion;

        Loading.Invisible();
        CutSceneMain.FadeReqCutScene(cutsceneData, delegate()
        {
            this.OnStartCutScene(isArousal, isResetEquipChip);
        }, delegate()
        {
            this.characterDetailed.StartAnimation();
            if (!isResetEquipChip)
            {
                RestrictionInput.EndLoad();
            }
        }, 0.5f, 0.5f);
    }