updat core

This commit is contained in:
2024-10-23 14:56:16 +08:00
parent 61972881b6
commit 4fc0810107
28 changed files with 990 additions and 68 deletions

View File

@@ -15,9 +15,18 @@ namespace Game.Component
public bool IsActiveGame;
private float _moveGlobalOffset = 1;
//玩家位置
public Vector2 PlayerPosition { private set; get; }
public bool IsRunaway { get ; private set ; }
public float MoveGlobalOffset => this._moveGlobalOffset;
public bool IsPause
{
get => this._moveGlobalOffset <= 0;
set => this._moveGlobalOffset = value ? 0 : 1;
}
private TimeHandler _RunawayTimeHandler;
@@ -71,19 +80,21 @@ namespace Game.Component
public void ResetGame ()
{
this.IsPause = false;
this._RunawayTimeHandler?.Kill ();
this.IsRunaway = false;
this.ScenePart.RefreshInit ();
this.PlayerEntity.speed = this.ScenePart.playerBaseSpeed;
this.PlayerEntity.transform.position = this.ScenePart.createPos.position;
this.PlayerEntity.gameObject.SetActive (true);
this.PlayerEntity.RefreshInit ();
//播放特效
}
public void OverlyCoin (int messageOverlyCoin)
public bool OverlyCoin (int messageOverlyCoin)
{
// ReSharper disable once Unity.NoNullPropagation
this.ScenePart?.AddConditionNumber (messageOverlyCoin);
return this.ScenePart?.AddConditionNumber (messageOverlyCoin) ?? false;
}
private void OnRunaway (IEventMessage message)