using ColdMint.scripts.character; using ColdMint.scripts.inventory; using ColdMint.scripts.map.events; using Godot; namespace ColdMint.scripts; /// /// The node holder within the game scene /// 游戏场景内的节点持有者 /// public static class GameSceneNodeHolder { private static Player? _player; /// /// Player instances within the game scene /// 游戏场景内的玩家实例 /// public static Player? Player { get => _player; set { _player = value; //Broadcast the event to the outside when the player instance changes. //当玩家实例改变时,向外广播事件。 var playerInstanceChangeEvent = new PlayerInstanceChangeEvent { PlayerInstance = _player }; EventManager.PlayerInstanceChangeEvent?.Invoke(playerInstanceChangeEvent); } } /// /// WeaponContainer /// 武器容器 /// public static Node2D? WeaponContainer { get; set; } /// /// PacksackContainer /// 背包容器 /// public static Node2D? PacksackContainer { get; set; } /// /// PlayerContainer /// 玩家容器 /// public static Node2D? PlayerContainer { get; set; } /// /// AICharacterContainer /// AICharacter角色 /// public static Node2D? AiCharacterContainer { get; set; } /// /// HotBar /// 快捷栏 /// public static HotBar? HotBar { get; set; } /// /// Health Bar UI /// 健康条UI /// public static HealthBarUi? HealthBarUi { get; set; } /// /// operation tip /// 操作提示 /// public static RichTextLabel? OperationTipLabel { get; set; } }