This commit is contained in:
CortexCore
2025-05-03 15:22:17 +08:00
parent 994817348b
commit 31aa4c420f
298 changed files with 1139 additions and 24148 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Animancer;
using BITKit;
using BITKit.Entities;
using Cysharp.Threading.Tasks;
@@ -19,6 +20,7 @@ namespace Net.Like.Xue.Tokyo
private readonly IPlayerFactory _playerFactory;
private readonly IDialogueService _dialogueService;
private readonly PlayerAutoHealController _healController;
private readonly ITicker _ticker;
@@ -32,22 +34,25 @@ namespace Net.Like.Xue.Tokyo
{
_playerFactory = playerFactory;
_dialogueService = dialogueService;
_healController = healController;
_ticker = ticker;
_entitiesService = entitiesService;
_logger = logger;
_playerFactory.OnEntityCreated += OnEntityCreated;
_disabledHealth.AddListener(x =>
{
_logger.LogInformation(!x ? "开启回血" : "关闭回血");
healController.Enabled = !x;
});
_disabledHealth.AddListener(OnDisableHealth);
_disabledHealth.Invoke();
ticker.Add(OnTick);
}
void OnDisableHealth(bool x)
{
_logger.LogInformation(!x ? "开启回血" : "关闭回血");
_healController.Enabled = !x;
}
private void OnTick(float obj)
{