Example #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);
        }
    }
Example #2
0
        public void StartAnimation()
        {
            base.gameObject.SetActive(true);
            CharacterParams component = this.beforeMonster.GetComponent <CharacterParams>();

            component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
            component = this.afterMonster.GetComponent <CharacterParams>();
            component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
        }
Example #3
0
        public void SkipAnimation()
        {
            AppCoroutine.Stop(this.animationTextImage, false);
            GashaAnimationCommon.PlayParticle(this.circleParticleRoot);
            this.subCamera.fieldOfView             = 30f;
            this.subCamera.transform.localPosition = new Vector3(2f, 1f, 0f);
            if (MonsterGrowStepData.IsUltimateScope(this.growStep))
            {
                this.mainCamera.backgroundColor = this.bgColorRareHigh;
                this.subCamera.backgroundColor  = this.bgColorRareHigh;
            }
            CharacterParams component = this.gashaMonster.GetComponent <CharacterParams>();

            if (!this.gashaMonster.activeSelf)
            {
                this.gashaMonster.SetActive(true);
                component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
                CutsceneCommon.SetBillBoardCamera(this.gashaMonster, this.subCamera);
            }
            this.cameraSwitcher.SetLookAtObject(component.characterFaceCenterTarget);
            if (!SoundMng.Instance().IsPlayingSE_Ex(this.seHandle1) && !SoundMng.Instance().IsPlayingSE_Ex(this.seHandle2))
            {
                this.sound.PlaySE("SEInternal/Cutscene/se_214");
            }
        }
Example #4
0
    private void WaveResetEnemyResetupFunction(string prefabId, int num, int i, bool isRecover = false)
    {
        CharacterParams @object = base.battleStateData.preloadEnemiesParams.GetObject(prefabId, num.ToString());

        @object.gameObject.SetActive(true);
        @object.Initialize(base.hierarchyData.cameraObject.camera3D);
        @object.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
        @object.transform.position = base.battleStateData.enemiesSpawnPoint[i].position;
        @object.transform.rotation = base.battleStateData.enemiesSpawnPoint[i].rotation;
        base.battleStateData.enemies[i].CharacterParams = @object;
        if (!isRecover)
        {
            base.battleStateData.enemies[i].InitializeAp();
        }
        ThreeDHoldPressButton threeDHoldPressButton = @object.gameObject.GetComponent <ThreeDHoldPressButton>();

        if (threeDHoldPressButton == null)
        {
            threeDHoldPressButton          = @object.gameObject.AddComponent <ThreeDHoldPressButton>();
            threeDHoldPressButton.camera3D = base.hierarchyData.cameraObject.camera3D;
        }
        else
        {
            threeDHoldPressButton.onHoldWaitPress.Clear();
            threeDHoldPressButton.onDisengagePress.Clear();
        }
        threeDHoldPressButton.waitPressCall = 0.2f;
        BattleInputUtility.AddEvent(threeDHoldPressButton.onHoldWaitPress, new Action <int>(base.stateManager.input.OnShowEnemyDescription3D), i);
        BattleInputUtility.AddEvent(threeDHoldPressButton.onDisengagePress, new Action(base.stateManager.input.OnHideEnemyDescriotion3D));
        @object.gameObject.SetActive(false);
    }
        public override bool RunScriptCommand()
        {
            bool result = false;
            AdventureDigimonInfo digimonInfo = ClassSingleton <AdventureSceneData> .Instance.GetDigimonInfo(this.charaId);

            if (digimonInfo != null)
            {
                CharacterParams        component  = digimonInfo.model.GetComponent <CharacterParams>();
                InvocationEffectParams component2 = digimonInfo.skillEffectList[this.uniqueSkillIndex].GetComponent <InvocationEffectParams>();
                LightColorChanger      component3 = ClassSingleton <AdventureSceneData> .Instance.adventureLight.GetComponent <LightColorChanger>();

                IEnumerator enumerator = component2.SkillInitialize(ClassSingleton <AdventureSceneData> .Instance.adventureCamera.camera3D, ClassSingleton <AdventureSceneData> .Instance.stage, component3);
                while (enumerator.MoveNext())
                {
                }
                CameraParams component4 = digimonInfo.skillCameraAnimation[this.uniqueSkillIndex].GetComponent <CameraParams>();
                string       text       = digimonInfo.skillEffectSeList[this.uniqueSkillIndex];
                if (null != component && null != component2 && null != component4 && !string.IsNullOrEmpty(text))
                {
                    component.PlayAnimation(CharacterAnimationType.attacks, SkillType.Deathblow, this.uniqueSkillIndex, null, null);
                    component2.transform.position = component.transform.position;
                    component4.transform.position = component.transform.position;
                    AppCoroutine.Start(component2.PlaySkillAnimation(component), new Action(this.OnFinishCommand), false);
                    component4.currentTargetCamera = ClassSingleton <AdventureSceneData> .Instance.adventureCamera.camera3D;
                    component4.PlayCameraAnimation(component, false, false);
                    SoundMng.Instance().TryPlaySE("SE/" + text + "/sound", 0f, false, true, null, -1);
                    base.SetContinueAnalyzeForAnimationWaitTime(this.isWaitFlag);
                    result = true;
                }
            }
            return(result);
        }
Example #6
0
    public void PlayDeadAnimationCharacterAction(Action deathEffectPlay, CharacterStateControl character)
    {
        HitEffectParams hitEffectParams;

        if (character.isEnemy)
        {
            bool flag = base.stateManager.IsLastBattleAndAllDeath();
            if (flag)
            {
                hitEffectParams = (BattleEffectManager.Instance.GetEffect("EFF_COM_BOSSDEATH") as HitEffectParams);
                base.battleStateData.UseLastDeadEffect.Add(hitEffectParams);
            }
            else
            {
                hitEffectParams = (BattleEffectManager.Instance.GetEffect("EFF_COM_DEATH") as HitEffectParams);
                base.battleStateData.UseDeathEffect.Add(hitEffectParams);
            }
        }
        else
        {
            hitEffectParams = (BattleEffectManager.Instance.GetEffect("EFF_COM_DEATH") as HitEffectParams);
            base.battleStateData.UseDeathEffect.Add(hitEffectParams);
        }
        CharacterParams        characterParams  = character.CharacterParams;
        CharacterAnimationType type             = CharacterAnimationType.dead;
        HitEffectParams        hitEffectParams2 = hitEffectParams;

        characterParams.PlayAnimation(type, SkillType.Attack, 0, hitEffectParams2, deathEffectPlay);
    }
Example #7
0
        private void Character3_LineOn()
        {
            this.afterMonster.SetActive(true);
            CharacterParams component = this.afterMonster.GetComponent <CharacterParams>();

            component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
            this.afterMonsterMaterialList = CutsceneCommon.SetWireFrameRendering(this.afterMonster, this.wireMaterial);
        }
        private GameObject CreateMonster(string modelId)
        {
            GameObject gameObject = CutsceneCommon.LoadMonsterModel(base.transform, modelId);

            gameObject.transform.localPosition = Vector3.zero;
            CharacterParams component = gameObject.GetComponent <CharacterParams>();

            component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
            gameObject.SetActive(false);
            return(gameObject);
        }
Example #9
0
        public void SkipAnimation()
        {
            if (!this.growAnimator.GetCurrentAnimatorStateInfo(0).IsTag("GrowStep"))
            {
                this.StartAnimationGrowStepText();
            }
            this.cameraSwitcher.EnableMainCamera();
            CutsceneCommon.SetBillBoardCamera(this.gashaMonster, this.mainCamera);
            CharacterParams component = this.gashaMonster.GetComponent <CharacterParams>();

            component.PlayAnimation(CharacterAnimationType.win, SkillType.Attack, 0, null, null);
        }
Example #10
0
        public IEnumerator StartAnimation()
        {
            this.StartAnimationGrowStepText();
            yield return(new WaitForSeconds(2f));

            this.cameraSwitcher.EnableMainCamera();
            CutsceneCommon.SetBillBoardCamera(this.gashaMonster, this.mainCamera);
            CharacterParams charaParam = this.gashaMonster.GetComponent <CharacterParams>();

            charaParam.PlayAnimation(CharacterAnimationType.win, SkillType.Attack, 0, null, null);
            base.EndCallback();
            yield break;
        }
Example #11
0
    private IEnumerator WaitEndAction()
    {
        FarmDigimonAI.ActionParam param = this.farmDigimonAI.GetActionParam();
        switch (param.actionID)
        {
        case FarmDigimonAI.ActionID.MEAT_FARM:
        case FarmDigimonAI.ActionID.STROLL:
        case FarmDigimonAI.ActionID.STROLL_FAST:
        case FarmDigimonAI.ActionID.CONSTRUCTION:
            if (param.pathGridIndexs != null)
            {
                CharacterParams characterParams = this.digimon.GetComponent <CharacterParams>();
                characterParams.PlayAnimation(CharacterAnimationType.move, SkillType.Attack, 0, null, null);
                this.actionSubEnumerator = this.farmDigimonAction.Walk();
                yield return(base.StartCoroutine(this.actionSubEnumerator));

                this.actionSubEnumerator = null;
            }
            break;

        case FarmDigimonAI.ActionID.TOUCH_ACTION:
        {
            CharacterParams characterParams2 = this.digimon.GetComponent <CharacterParams>();
            characterParams2.PlayAnimation(CharacterAnimationType.move, SkillType.Attack, 0, null, null);
            this.actionSubEnumerator = this.farmDigimonAction.TouchAction();
            yield return(base.StartCoroutine(this.actionSubEnumerator));

            this.actionSubEnumerator = null;
            break;
        }

        default:
        {
            CharacterParams component = this.digimon.GetComponent <CharacterParams>();
            component.PlayAnimationSmooth(CharacterAnimationType.revival, SkillType.Attack, 0, null, null);
            break;
        }
        }
        CharacterParams component2 = this.digimon.GetComponent <CharacterParams>();

        component2.PlayAnimationSmooth(CharacterAnimationType.revival, SkillType.Attack, 0, null, null);
        yield return(new WaitForSeconds(5f));

        this.farmDigimonAI.ClearActionParam();
        this.actionState = FarmDigimon.ActionState.THINKING;
        yield return(null);

        yield break;
    }
Example #12
0
    public void LoadChara(string path)
    {
        GameObject original = AssetDataMng.Instance().LoadObject(path, null, true) as GameObject;

        this.goChara = UnityEngine.Object.Instantiate <GameObject>(original);
        CharacterParams component = this.goChara.GetComponent <CharacterParams>();

        component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
        this.goChara.name = path;
        this.goChara.transform.SetParent(base.gameObject.transform);
        this.goChara.transform.localPosition = new Vector3(0f, 0f, 0f);
        Quaternion localRotation = Quaternion.Euler(0f, 180f, 0f);

        this.goChara.transform.localRotation = localRotation;
    }
Example #13
0
    public IEnumerator LoadCharacterParam(string characterId, int index, Action <CharacterParams, int, string> result)
    {
        BattleDebug.Log(string.Concat(new object[]
        {
            "--- モンスター単体ロード characterId[",
            characterId,
            "] index[",
            index,
            "] : 開始"
        }));
        GameObject prefab    = base.stateManager.serverControl.GetCharacterPrefab(characterId);
        GameObject character = base.Instantiate <GameObject>(prefab);

        yield return(null);

        character.name = characterId;
        character.transform.SetParent(base.battleStateData.characterRoot);
        character.transform.position = Vector3.zero;
        character.transform.rotation = Quaternion.identity;
        CharacterParams characterParams = character.GetComponent <CharacterParams>();
        CapsuleCollider col             = characterParams.GetComponent <CapsuleCollider>();

        col.radius = 1.03f;
        if (base.battleStateData.useCharacterShadow)
        {
            characterParams.SetShadowObject();
            yield return(null);
        }
        characterParams.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
        yield return(null);

        characterParams.Initialize(base.hierarchyData.cameraObject.camera3D);
        GameObject      hasColliderObject = characterParams.collider.gameObject;
        BattleStateData battleStateData   = base.battleStateData;

        battleStateData.characterColliderLayerMask |= 1 << hasColliderObject.layer;
        character.gameObject.SetActive(false);
        result(characterParams, index, characterId);
        BattleDebug.Log(string.Concat(new object[]
        {
            "--- モンスター単体ロード characterId[",
            characterId,
            "] index[",
            index,
            "] : 完了"
        }));
        yield break;
    }
	public override void SetData(CutsceneDataBase data)
	{
		CutsceneDataTraining cutsceneDataTraining = data as CutsceneDataTraining;
		if (cutsceneDataTraining != null)
		{
			this.endCallback = cutsceneDataTraining.endCallback;
			this.allSkipButton.Initialize();
			this.allSkipButton.AddAction(new Action(this.EndCutscene));
			GameObject gameObject = CutsceneCommon.LoadMonsterModel(base.transform, cutsceneDataTraining.baseModelId);
			gameObject.transform.localPosition = Vector3.zero;
			CharacterParams component = gameObject.GetComponent<CharacterParams>();
			component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
			CutsceneCommon.SetBillBoardCamera(gameObject, this.mainCamera);
			this.cameraTransform = this.mainCamera.transform;
			this.cameraRotatePosition = base.transform;
			this.lookAtPosition = component.characterCenterTarget;
			this.workVector3 = Vector3.zero;
			this.scriptAnime.Initialize(this.cutsceneSound, gameObject, cutsceneDataTraining.materialNum, new Action(this.EndCutscene));
		}
	}
Example #15
0
    private void SpawnMonster(string modelId, float scale, int index)
    {
        string     filePath   = MonsterObject.GetFilePath(modelId);
        GameObject gameObject = UnityEngine.Object.Instantiate(AssetDataMng.Instance().LoadObject(filePath, null, true)) as GameObject;

        gameObject.name = "DIGIMON_" + index;
        int mask = LayerMask.NameToLayer("UI3D");

        Util.SetLayer(gameObject, mask);
        Transform transform = gameObject.transform;

        this.monsterTransforms[index] = transform;
        transform.SetParent(this.threeDCameraTrans);
        transform.localScale    = new Vector3(scale, scale, scale);
        transform.localPosition = Vector3.up * 3000f;
        transform.rotation      = Quaternion.Euler(0f, 180f, 0f);
        CharacterParams component = gameObject.GetComponent <CharacterParams>();

        component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
    }
Example #16
0
        public IEnumerator StartAnimation()
        {
            this.circleParticleRoot.Play();
            this.subCamera.fieldOfView             = 30f;
            this.subCamera.transform.localPosition = new Vector3(2f, 1f, 0f);
            if (MonsterGrowStepData.IsUltimateScope(this.growStep))
            {
                this.mainCamera.backgroundColor = this.bgColorRareHigh;
                this.subCamera.backgroundColor  = this.bgColorRareHigh;
            }
            this.gashaMonster.SetActive(true);
            CharacterParams charaParam = this.gashaMonster.GetComponent <CharacterParams>();

            charaParam.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
            CutsceneCommon.SetBillBoardCamera(this.gashaMonster, this.subCamera);
            this.cameraSwitcher.SetLookAtObject(charaParam.characterFaceCenterTarget);
            if (MonsterGrowStepData.IsRipeScope(this.growStep))
            {
                this.animationTextImage = this.StartAnimationRareTextImage("RareLow");
                yield return(AppCoroutine.Start(this.animationTextImage, false));
            }
            else if (MonsterGrowStepData.IsPerfectScope(this.growStep))
            {
                this.animationTextImage = this.StartAnimationRareTextImage("RareMiddle");
                yield return(AppCoroutine.Start(this.animationTextImage, false));
            }
            else if (MonsterGrowStepData.IsUltimateScope(this.growStep))
            {
                this.animationTextImage = this.StartAnimationRareTextImage("RareHigh");
                yield return(AppCoroutine.Start(this.animationTextImage, false));
            }
            else
            {
                yield return(null);
            }
            this.seHandle2 = this.sound.PlaySE("SEInternal/Cutscene/se_214");
            base.EndCallback();
            yield break;
        }
Example #17
0
    public void LoadCharas(List <string> pathList, float posX = 0f, float posY = 4000f)
    {
        this.goCharaList = new List <GameObject>();
        this.cpParamList = new List <CharacterParams>();
        int num = 0;

        foreach (string text in pathList)
        {
            GameObject original = AssetDataMng.Instance().LoadObject(text, null, true) as GameObject;
            this.goCharaList.Add(UnityEngine.Object.Instantiate <GameObject>(original));
            CharacterParams component = this.goCharaList[num].GetComponent <CharacterParams>();
            component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
            this.cpParamList.Add(component);
            this.goCharaList[num].name = text;
            this.goCharaList[num].transform.SetParent(this.Locater[num].transform.parent);
            this.goCharaList[num].transform.transform.localPosition = Vector3.zero;
            this.goCharaList[num].transform.transform.localScale    = Vector3.one;
            Vector3 previewCameraPosition = component.GetPreviewCameraPosition(this.cam.transform.parent);
            component.transform.position = this.cam.transform.position - previewCameraPosition + this.Locater[num].transform.position;
            component.transform.rotation = this.Locater[num].transform.rotation;
            num++;
        }
        base.gameObject.transform.localPosition = new Vector3(posX, posY, 0f);
    }
Example #18
0
    private void StartIdleAnimation()
    {
        CharacterParams component = this.digimon.GetComponent <CharacterParams>();

        component.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
    }
Example #19
0
        private void OnAttackAnimation()
        {
            CharacterParams component = this.afterMonster.GetComponent <CharacterParams>();

            component.PlayAnimation(CharacterAnimationType.win, SkillType.Attack, 0, null, null);
        }
 private IEnumerator PlaySkillAnimationInternal(CharacterParams attacker)
 {
     if (attacker != null)
     {
         if (this._cameraMotionId.Length > 0)
         {
             this.SetPosition(attacker.transform, null);
         }
         else
         {
             this.SetPosition(attacker.transform, new Vector3?(attacker.dropItemOffsetPosition));
         }
     }
     this.StopAnimationInternal();
     this._isPlaying        = true;
     this.currentStageColor = Color.black;
     if (this._renderCamera != null)
     {
         this.currentStageColor = this._renderCamera.backgroundColor;
         if (this._hideStage)
         {
             if (this._lightColorChanger != null)
             {
                 this._lightColorChanger.isEnable    = false;
                 this.currentSunLightColor           = this._lightColorChanger.light.color;
                 this._lightColorChanger.light.color = this._hideStageLightColor;
                 this.currentSunLightRotation        = this._lightColorChanger.light.transform.rotation;
                 this._lightColorChanger.light.transform.rotation = Quaternion.Euler(this._hideStageLightEulerAngles);
             }
             if (this._stageObject != null)
             {
                 this._stageObject.SetActive(false);
             }
             this._renderCamera.backgroundColor = this._hideStageBackgroundColor;
         }
     }
     this._effectAnimation.clip.wrapMode = WrapMode.Once;
     this._effectAnimation[this._effectAnimation.clip.name].time = 0f;
     this._effectAnimation.PlayQueued(this._effectAnimation.clip.name, QueueMode.PlayNow);
     if (attacker != null && attacker.GetFindAttackMotion(this._motionIndex))
     {
         attacker.PlayAnimation(CharacterAnimationType.attacks, this._attackAnimationType, this._motionIndex, null, null);
         this.CharacterFollowingInitializeInternal(attacker);
         this.BillboardObjectInitializeInternal(attacker.transform, attacker.RootToCenterDistance());
         this.ParticheControllerInitializeInternal();
     }
     if (this._cameraMotionId.Length == 0)
     {
         this._scale = attacker.effectScale;
         base.transform.localScale  = Vector3.one;
         base.transform.localScale *= this._scale;
         foreach (ParticleSystem particles in this._particleSystems)
         {
             ParticleScaler.Scale(particles, this._scale, true, null);
         }
     }
     if (this._attackAnimationType == SkillType.InheritanceTechnique)
     {
         float motionTime = (!(attacker != null)) ? 0f : attacker.AnimationClipLength;
         float effectTime = this._effectAnimation[this._effectAnimation.clip.name].length;
         float time       = Mathf.Max(motionTime, effectTime);
         while (time > 0f)
         {
             time -= Time.deltaTime;
             if (!this._effectAnimation.isPlaying && this._effectAnimation.gameObject.activeInHierarchy)
             {
                 this._effectAnimation.gameObject.SetActive(false);
             }
             yield return(null);
         }
         this._effectAnimation.gameObject.SetActive(true);
     }
     else
     {
         while (this._effectAnimation.isPlaying)
         {
             yield return(null);
         }
     }
     yield break;
 }