update core

This commit is contained in:
2024-10-28 00:40:00 +08:00
parent 991ce10c52
commit 66b8593446
14 changed files with 116 additions and 20 deletions

View File

@@ -3,6 +3,7 @@ using Framework.Audio;
using Framework.Timer;
using Game.EventDefine;
using UniFramework.Event;
using Unity.Mathematics;
using UnityEngine;
namespace Game.Component
@@ -17,11 +18,14 @@ namespace Game.Component
public bool IsActiveGame;
private float _moveGlobalOffset = 1;
private float _expGlobalOffset = 0;
//玩家位置
public Vector2 PlayerPosition { private set; get; }
public bool IsRunaway { get ; private set ; }
public float MoveGlobalOffset => this._moveGlobalOffset;
public Vector2 PlayerPosition { private set; get; }
public bool IsRunaway { get ; private set ; }
public float MoveGlobalOffset => this._moveGlobalOffset;
public float EnemyMoveGlobalOffset => math.clamp (this._moveGlobalOffset - this._expGlobalOffset , 0 , 1f);
public bool IsPause
{
@@ -81,6 +85,7 @@ namespace Game.Component
public void ResetGame ()
{
this._expGlobalOffset = Mathf.Clamp (this.ScenePart.LossCount * 0.025f , 0 , 0.25f);
this.PlayerEntity.gameObject.SetActive (false);
this.IsPause = false;
this._RunawayTimeHandler?.Kill ();