public void TargetManualSelectAndApplyUIFunction(CharacterStateControl currentCharacters = null) { if (currentCharacters != null && currentCharacters.IsSelectedSkill) { CharacterStateControl targetCharacter = null; if (base.battleStateData.isPossibleTargetSelect && Input.GetKeyUp(KeyCode.Mouse0) && BoolExtension.AllMachValue(false, new bool[] { base.battleStateData.isShowMenuWindow, base.battleStateData.isShowRevivalWindow }) && !base.stateManager.uiControl.GetIsClickedUI()) { Ray ray = base.hierarchyData.cameraObject.camera3D.ScreenPointToRay(Input.mousePosition); RaycastHit raycastHit; if (Physics.Raycast(ray, out raycastHit, float.PositiveInfinity, base.battleStateData.characterColliderLayerMask)) { CharacterParams component = raycastHit.collider.gameObject.GetComponent <CharacterParams>(); CharacterStateControl[] totalCharacters = base.battleStateData.GetTotalCharacters(); foreach (CharacterStateControl characterStateControl in totalCharacters) { if (characterStateControl.CharacterParams == component) { targetCharacter = characterStateControl; break; } } } } this.SetTarget(currentCharacters, targetCharacter); } else { this.AllHideTargetIcon(); } }
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); }
private bool LoadDigimonNotCharaParams(string monsterGroupId, AdventureDigimonInfo digimonInfo) { bool result = true; try { MonsterClientMaster monsterMasterByMonsterGroupId = MonsterMaster.GetMonsterMasterByMonsterGroupId(monsterGroupId); string modelId = monsterMasterByMonsterGroupId.Group.modelId; string filePath = MonsterObject.GetFilePath(modelId); GameObject original = AssetDataMng.Instance().LoadObject(filePath, null, true) as GameObject; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original); gameObject.name = "Digimon_" + monsterGroupId; gameObject.transform.parent = ClassSingleton <AdventureSceneData> .Instance.scriptObjectRoot.transform; gameObject.SetActive(false); digimonInfo.model = gameObject; CharacterParams component = gameObject.GetComponent <CharacterParams>(); UnityEngine.Object.Destroy(component); CapsuleCollider component2 = gameObject.GetComponent <CapsuleCollider>(); UnityEngine.Object.Destroy(component2); Transform transform = gameObject.transform; for (int i = 0; i < transform.childCount; i++) { Animation component3 = transform.GetChild(i).GetComponent <Animation>(); UnityEngine.Object.Destroy(component3); } } catch { result = false; } return(result); }
protected virtual void RotationFixerUpdateInternal(CharacterParams character) { foreach (RotationFixer rotationFixer in this._rotationFixer) { rotationFixer.SetRotation(character); } }
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); }
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"); } }
public override void SetData(CutsceneDataBase data) { CutsceneDataJogress cutsceneDataJogress = data as CutsceneDataJogress; if (cutsceneDataJogress != null) { this.endCallback = cutsceneDataJogress.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(this.beforeMonsterParentTransform, cutsceneDataJogress.beforeModelId); gameObject.transform.localPosition = Vector3.zero; GameObject gameObject2 = CutsceneCommon.LoadMonsterModel(this.partnerMonsterParentTransform, cutsceneDataJogress.partnerModelId); gameObject2.transform.localPosition = Vector3.zero; GameObject gameObject3 = CutsceneCommon.LoadMonsterModel(this.afterMonsterParentTransform, cutsceneDataJogress.afterModelId); gameObject3.transform.localPosition = Vector3.zero; gameObject3.SetActive(false); this.afterMonsterCharaParam = gameObject3.GetComponent <CharacterParams>(); CutsceneCommon.SetBillBoardCamera(gameObject, this.mainCamera); CutsceneCommon.SetBillBoardCamera(gameObject2, this.mainCamera); CutsceneCommon.SetBillBoardCamera(gameObject3, this.mainCamera); this.animeEvent.Initialize(this.cutsceneSound, gameObject, gameObject2, gameObject3); } }
protected virtual void CharacterFollowingInitializeInternal(CharacterParams character) { foreach (CharacterFollowingTarget characterFollowingTarget in this._characterFollowingTargets) { switch (characterFollowingTarget.characterTarget) { case CharacterTarget.CharacterCenter: characterFollowingTarget.following = character.characterCenterTarget; break; case CharacterTarget.CharacterRoot: characterFollowingTarget.following = character.transform; break; case CharacterTarget.CharacterFaceCenter: characterFollowingTarget.following = character.characterFaceCenterTarget; break; default: characterFollowingTarget.following = null; break; } characterFollowingTarget.onAutoUpdate = false; characterFollowingTarget.ManualUpdate(); } }
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); } }
public void PlayAnimationTrigger(CharacterParams param) { this.StopAnimation(); base.gameObject.SetActive(true); if (this._target == CharacterTarget.CharacterCenter) { this._PlayAnimation = base.PlayAnimation(param.characterCenterTarget, param.RootToCenterDistance()); } else if (this._target == CharacterTarget.CharacterFaceCenter) { this._PlayAnimation = base.PlayAnimation(param.characterFaceCenterTarget, param.RootToCenterDistance()); } else if (this._target == CharacterTarget.CharacterRoot) { this._PlayAnimation = base.PlayAnimation(param.transform, param.RootToCenterDistance()); } else { this._PlayAnimation = base.PlayAnimation(null, param.RootToCenterDistance()); } this.CharacterFollowingInitializeInternal(param); this.cachedCharacter = param; base.StartCoroutine(this._PlayAnimation); this._scale = this.cachedCharacter.effectScale; base.transform.localScale = Vector3.one; base.transform.localScale *= this._scale; foreach (ParticleSystem particles in this._particleSystems) { ParticleScaler.Scale(particles, this._scale, true, null); } }
public override void SetData(CutsceneDataBase data) { CutsceneDataInheritance cutsceneDataInheritance = data as CutsceneDataInheritance; if (cutsceneDataInheritance != null) { this.endCallback = cutsceneDataInheritance.endCallback; this.allSkipButton.Initialize(); this.allSkipButton.AddAction(new Action(this.EndCutscene)); this.touchScreenButton.Initialize(); this.touchScreenButton.AddAction(new Action(this.EndCutscene)); MaterialController[] componentsInChildren = base.GetComponentsInChildren <MaterialController>(); foreach (MaterialController materialController in componentsInChildren) { materialController.isRealtimeUpdate = true; } GameObject gameObject = CutsceneCommon.LoadMonsterModel(this.baseMonsterParentTransform, cutsceneDataInheritance.baseModelId); gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; GameObject gameObject2 = CutsceneCommon.LoadMonsterModel(this.materialMonsterParentTransform, cutsceneDataInheritance.materialModelId); gameObject2.transform.localPosition = Vector3.zero; gameObject2.transform.localRotation = Quaternion.identity; CharacterParams component = gameObject.GetComponent <CharacterParams>(); this.cameraTarget = component.characterCenterTarget; CutsceneCommon.SetBillBoardCamera(gameObject, this.mainCamera); CutsceneCommon.SetBillBoardCamera(gameObject2, this.mainCamera); CharacterParams component2 = gameObject2.GetComponent <CharacterParams>(); this.animeEvent.Initialize(this.cutsceneSound, component, component2); } }
protected void OnClickedScreen() { CharacterParams characterParams = this.characterCameraView.csRender3DRT.GetCharacterParams(); DigimonModelPlayer component = base.GetComponent <DigimonModelPlayer>(); if (!this.isOpenScreen) { this.MoveTo(this.goSCR_HEADER, this.vPosSCR_HEADER, 0.18f, iTween.EaseType.linear); this.MoveTo(this.goSCR_DETAIL, this.vPosSCR_DETAIL, 0.18f, iTween.EaseType.linear); this.fullScreenButtonLabel.text = StringMaster.GetString("SystemButtonReturn"); if (null != component) { component.MonsterParams = characterParams; } this.characterCameraView.MoveToCenter(0.18f); } else { if (null != characterParams) { characterParams.transform.localScale = Vector3.one; } this.MoveTo(this.goSCR_HEADER, this.vOrgSCR_HEADER, 0.18f, iTween.EaseType.linear); this.MoveTo(this.goSCR_DETAIL, this.vOrgSCR_DETAIL, 0.18f, iTween.EaseType.linear); this.fullScreenButtonLabel.text = StringMaster.GetString("CharaDetailsFullScreen"); if (null != component) { component.MonsterParams = null; } this.characterCameraView.MoveToLeft(0.18f); } this.isOpenScreen = !this.isOpenScreen; this.characterCameraView.enableTouch = this.isOpenScreen; }
private IEnumerator PlayCameraAnimationCorutine(CharacterParams characterParams, bool onInverse, bool onClampAnimation) { IEnumerator playCameraAnimationCorutine; if (characterParams == null) { playCameraAnimationCorutine = this.PlayCameraAnimationCorutine(Vector3.zero, base.transform.eulerAngles, onInverse, onClampAnimation); } else if (this.rootPosition == CameraParams.RootPosition.targetRoot) { playCameraAnimationCorutine = this.PlayCameraAnimationCorutine(characterParams.transform.position, characterParams.transform.eulerAngles, onInverse, onClampAnimation); } else if (this.rootPosition == CameraParams.RootPosition.worldRoot) { playCameraAnimationCorutine = this.PlayCameraAnimationCorutine(Vector3.zero, characterParams.transform.eulerAngles, onInverse, onClampAnimation); } else if (this.rootPosition == CameraParams.RootPosition.targetCenter) { playCameraAnimationCorutine = this.PlayCameraAnimationCorutine(characterParams.characterCenterTarget.position, characterParams.transform.eulerAngles, onInverse, onClampAnimation); } else { playCameraAnimationCorutine = this.PlayCameraAnimationCorutine(characterParams.characterFaceCenterTarget.position, characterParams.transform.eulerAngles, onInverse, onClampAnimation); } while (playCameraAnimationCorutine.MoveNext()) { yield return(null); } yield break; }
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 void cameraPositionAdjustment() { CharacterParams component = this.afterMonster.GetComponent <CharacterParams>(); float num = component.RootToCenterDistance(); num = num / 2f + 1.5f; this.lastCutCamera.localPosition = new Vector3(0f, 0f, num); }
public void PlayCameraAnimation(CharacterParams characterParams, bool onInverse = false, bool onClampAnimation = false) { base.gameObject.SetActive(true); this.StopCameraAnimationInternal(); this.currentPlayAnimationCorutine = this.PlayCameraAnimationCorutine(characterParams, onInverse, onClampAnimation); this.currentPlayAnimationCorutine.MoveNext(); base.StartCoroutine(this.currentPlayAnimationCorutine); }
public void PassingTest() { const int toSet = 50; CharacterParams characterParams = new CharacterParams(); characterParams.PageSize = toSet; Assert.AreEqual(toSet, characterParams.PageSize); }
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); }
private void SetUpBillBoard() { if (this.digimon != null && this.farmCamera != null && base.gameObject.activeSelf && !this.isSetUpBillBoard) { CharacterParams component = this.digimon.GetComponent <CharacterParams>(); bool activeSelf = component.gameObject.activeSelf; component.gameObject.SetActive(true); component.SetBillBoardCamera(this.farmCamera); component.gameObject.SetActive(activeSelf); this.isSetUpBillBoard = true; } }
private void WaveResetPlayerResetupFunction(int i) { Transform transform = base.battleStateData.playerCharactersSpawnPoint[i]; CharacterParams characterParams = base.battleStateData.playerCharacters[i].CharacterParams; AlwaysEffectParams alwaysEffectParams = base.battleStateData.revivalReservedEffect[i]; characterParams.transform.position = transform.position; characterParams.transform.rotation = transform.rotation; characterParams.gameObject.SetActive(false); alwaysEffectParams.transform.position = transform.position; alwaysEffectParams.transform.rotation = transform.rotation; }
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); }
private void ShowCharacter() { this.ngTargetTex = this.goTargetTex.GetComponent <UITexture>(); GameObject gameObject = GUIManager.LoadCommonGUI("Render3D/Render3DRT", null); this.csRender3DRT = gameObject.GetComponent <CommonRender3DRT>(); string filePath = MonsterObject.GetFilePath(CMD_MealExecution.DataChg.GetMonsterMaster().Group.modelId); this.csRender3DRT.LoadChara(filePath, 0f, 4000f, -0.65f, 1.1f, true); this.renderTex = this.csRender3DRT.SetRenderTarget(1136, 820, 16); this.ngTargetTex.mainTexture = this.renderTex; this.charaParams = this.csRender3DRT.transform.GetComponentInChildren <CharacterParams>(); }
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; }
public void StartAutoChange(CharacterParams character) { if (this._cameraPositions.Length <= 0 || character == null) { return; } this.SetCharacter(character); this.isPlaying = true; base.gameObject.SetActive(true); this.time = this.interval; this.followPoint = this._targetLookAtPoint.position + UnityEngine.Random.insideUnitSphere; this._currentPosition = this.RandomCameraPosition(); }