update core

This commit is contained in:
2024-10-25 16:15:25 +08:00
parent 3a38008dc4
commit 2bb98a4b79
4 changed files with 9 additions and 4 deletions

View File

@@ -2008,7 +2008,7 @@ MonoBehaviour:
cameraCollider: {fileID: 4977006423313078515} cameraCollider: {fileID: 4977006423313078515}
createPos: {fileID: 25658124931772993} createPos: {fileID: 25658124931772993}
completeConditionNumber: 1 completeConditionNumber: 1
playerBaseSpeed: 2 playerBaseSpeed: 5
successProp: {fileID: 2048375561032638617} successProp: {fileID: 2048375561032638617}
--- !u!1 &8878032678881439204 --- !u!1 &8878032678881439204
GameObject: GameObject:

View File

@@ -74,19 +74,20 @@ namespace Game.Component
this.ScenePart.InitPart (); this.ScenePart.InitPart ();
// this.Pathfinder.data.SetData (this.ScenePart.mapCacheData.bytes); // this.Pathfinder.data.SetData (this.ScenePart.mapCacheData.bytes);
// this.Pathfinder.FlushGraphUpdates (); // this.Pathfinder.FlushGraphUpdates ();
this.Pathfinder.Scan ();
CameraManager.Instance.SetBoxCollider (this.ScenePart.cameraCollider); CameraManager.Instance.SetBoxCollider (this.ScenePart.cameraCollider);
} }
public void ResetGame () public void ResetGame ()
{ {
this.PlayerEntity.gameObject.SetActive (false);
this.IsPause = false; this.IsPause = false;
this._RunawayTimeHandler?.Kill (); this._RunawayTimeHandler?.Kill ();
this.IsRunaway = false; this.IsRunaway = false;
this.ScenePart.RefreshInit ();
this.PlayerEntity.speed = this.ScenePart.playerBaseSpeed; this.PlayerEntity.speed = this.ScenePart.playerBaseSpeed;
this.PlayerEntity.transform.position = this.ScenePart.createPos.position; this.PlayerEntity.transform.position = this.ScenePart.createPos.position;
this.PlayerEntity.transform.rotation = this.ScenePart.createPos.rotation;
this.PlayerEntity.gameObject.SetActive (true); this.PlayerEntity.gameObject.SetActive (true);
this.ScenePart.RefreshInit ();
this.PlayerEntity.RefreshInit (); this.PlayerEntity.RefreshInit ();
//播放特效 //播放特效
} }

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Guide; using System.Guide;
using Cysharp.Threading.Tasks;
using Framework.Audio; using Framework.Audio;
using Framework.FSMLite; using Framework.FSMLite;
using Framework.UI; using Framework.UI;
@@ -26,6 +27,8 @@ namespace Game.FsmNode
CameraEffectUtils.Instance.SetAberration (0f , 0.5f); CameraEffectUtils.Instance.SetAberration (0f , 0.5f);
CameraEffectUtils.Instance.SetGameCamBlur (0f , 0.5f , null); CameraEffectUtils.Instance.SetGameCamBlur (0f , 0.5f , null);
MapContent.Instance.IsActiveGame = true; MapContent.Instance.IsActiveGame = true;
await UniTask.Delay (100);
MapContent.Instance.Pathfinder.Scan ();
// MapContent.Instance.Pathfinder. // MapContent.Instance.Pathfinder.
AudioManager.Instance.PlayBGM (BgmAudio.FightingBgm); AudioManager.Instance.PlayBGM (BgmAudio.FightingBgm);
} }

View File

@@ -13,6 +13,7 @@ namespace Game.FsmNode
{ {
protected override async void OnEnter (params object[] args) protected override async void OnEnter (params object[] args)
{ {
MapContent.Instance.PlayerEntity.gameObject.SetActive (false);
if (MapContent.Instance.ScenePart == null) if (MapContent.Instance.ScenePart == null)
{ {
RoomManager.Instance.LoadScenePart (RoomManager.Instance.PartIndex); RoomManager.Instance.LoadScenePart (RoomManager.Instance.PartIndex);