Fixed warnings given by RiderIDE.
修复RiderIDE给出的警告。
This commit is contained in:
parent
f0f954f10c
commit
6c1b7b2e84
|
@ -47,7 +47,9 @@ public class AppConfigData
|
||||||
/// <para>OpenObserve configuration information</para>
|
/// <para>OpenObserve configuration information</para>
|
||||||
/// <para>OpenObserve的配置信息</para>
|
/// <para>OpenObserve的配置信息</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public OpenObserve? OpenObserve { get; set; }
|
public OpenObserve? OpenObserve { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -60,23 +62,31 @@ public class OpenObserve
|
||||||
/// <para>server address</para>
|
/// <para>server address</para>
|
||||||
/// <para>服务器地址</para>
|
/// <para>服务器地址</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? Address { get; set; }
|
public string? Address { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Access Token</para>
|
/// <para>Access Token</para>
|
||||||
/// <para>访问密匙</para>
|
/// <para>访问密匙</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? AccessToken { get; set; }
|
public string? AccessToken { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Organization ID</para>
|
/// <para>Organization ID</para>
|
||||||
/// <para>组织ID</para>
|
/// <para>组织ID</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? OrgId { get; set; }
|
public string? OrgId { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Stream Name</para>
|
/// <para>Stream Name</para>
|
||||||
/// <para>流名称</para>
|
/// <para>流名称</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? StreamName { get; set; }
|
public string? StreamName { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
|
@ -20,7 +20,6 @@ public sealed partial class AiCharacter : CharacterTemplate
|
||||||
//用于检测墙壁的射线
|
//用于检测墙壁的射线
|
||||||
private RayCast2D? _wallDetection;
|
private RayCast2D? _wallDetection;
|
||||||
|
|
||||||
public RayCast2D? WallDetection => _wallDetection;
|
|
||||||
private Vector2 _wallDetectionOrigin;
|
private Vector2 _wallDetectionOrigin;
|
||||||
private Area2D? _attackArea;
|
private Area2D? _attackArea;
|
||||||
|
|
||||||
|
@ -70,13 +69,21 @@ public sealed partial class AiCharacter : CharacterTemplate
|
||||||
/// <para>Navigation agent</para>
|
/// <para>Navigation agent</para>
|
||||||
/// <para>导航代理</para>
|
/// <para>导航代理</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public NavigationAgent2D? NavigationAgent2D { get; set; }
|
private NavigationAgent2D? NavigationAgent2D { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public IStateMachine? StateMachine { get; set; }
|
/// <summary>
|
||||||
|
/// <para>State machine</para>
|
||||||
|
/// <para>状态机</para>
|
||||||
|
/// </summary>
|
||||||
|
private IStateMachine? StateMachine { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public RayCast2D? AttackObstacleDetection => _attackObstacleDetection;
|
/// <summary>
|
||||||
|
/// <para>Attack obstacle detection</para>
|
||||||
|
/// <para>攻击障碍物检测</para>
|
||||||
|
/// </summary>
|
||||||
|
private RayCast2D? AttackObstacleDetection => _attackObstacleDetection;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -244,7 +244,9 @@ public static class LogCat
|
||||||
Level = level,
|
Level = level,
|
||||||
Message = concreteLog
|
Message = concreteLog
|
||||||
};
|
};
|
||||||
|
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||||
LogCollector.Push(logData);
|
LogCollector.Push(logData);
|
||||||
|
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (level)
|
switch (level)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using ColdMint.scripts.debug;
|
using ColdMint.scripts.debug;
|
||||||
using ColdMint.scripts.serialization;
|
using ColdMint.scripts.serialization;
|
||||||
using ColdMint.scripts.utils;
|
using ColdMint.scripts.utils;
|
||||||
|
@ -53,16 +52,24 @@ public static class ItemTypeRegister
|
||||||
LogCat.LogWithFormat("found_files", LogCat.LogLabel.Default, LogCat.UploadFormat, files.Length);
|
LogCat.LogWithFormat("found_files", LogCat.LogLabel.Default, LogCat.UploadFormat, files.Length);
|
||||||
//将文件解析为项目类型信息
|
//将文件解析为项目类型信息
|
||||||
//parse files to item type infos
|
//parse files to item type infos
|
||||||
IEnumerable<ItemTypeInfo> typeInfos =
|
var count = 0;
|
||||||
files.SelectMany(file => ParseFile($"{itemRegsDirPath}/{file}")).ToList();
|
foreach (var file in files)
|
||||||
LogCat.LogWithFormat("found_item_types", LogCat.LogLabel.Default, LogCat.UploadFormat, typeInfos.Count());
|
|
||||||
|
|
||||||
//遍历类型信息并注册它们。
|
|
||||||
//traverse type infos and register them.
|
|
||||||
foreach (var typeInfo in typeInfos)
|
|
||||||
{
|
{
|
||||||
RegisterTypeInfo(typeInfo);
|
var list = ParseFile($"{itemRegsDirPath}/{file}");
|
||||||
|
if (list == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var itemTypeInfo in list)
|
||||||
|
{
|
||||||
|
RegisterTypeInfo(itemTypeInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogCat.LogWithFormat("found_item_types", LogCat.LogLabel.Default, LogCat.UploadFormat, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -74,7 +81,6 @@ public static class ItemTypeRegister
|
||||||
private static IList<ItemTypeInfo>? ParseFile(string filePath)
|
private static IList<ItemTypeInfo>? ParseFile(string filePath)
|
||||||
{
|
{
|
||||||
var yamlFile = FileAccess.Open(filePath, FileAccess.ModeFlags.Read);
|
var yamlFile = FileAccess.Open(filePath, FileAccess.ModeFlags.Read);
|
||||||
|
|
||||||
//Read & deserialize
|
//Read & deserialize
|
||||||
//阅读和反序列化
|
//阅读和反序列化
|
||||||
var yamlString = yamlFile.GetAsText();
|
var yamlString = yamlFile.GetAsText();
|
||||||
|
@ -83,6 +89,14 @@ public static class ItemTypeRegister
|
||||||
return typeInfos;
|
return typeInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Registration type info</para>
|
||||||
|
/// <para>注册类型信息</para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="typeInfo">
|
||||||
|
///<para>typeInfo</para>
|
||||||
|
///<para>类型信息</para>
|
||||||
|
/// </param>
|
||||||
private static void RegisterTypeInfo(ItemTypeInfo typeInfo)
|
private static void RegisterTypeInfo(ItemTypeInfo typeInfo)
|
||||||
{
|
{
|
||||||
//Load scene and icon
|
//Load scene and icon
|
||||||
|
|
|
@ -10,11 +10,15 @@ public class RoomInjectionProcessorData
|
||||||
/// <para>Room injection processor ID</para>
|
/// <para>Room injection processor ID</para>
|
||||||
/// <para>房间注入处理器ID</para>
|
/// <para>房间注入处理器ID</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? Id { get; set; }
|
public string? Id { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Room injection processor configuration information</para>
|
/// <para>Room injection processor configuration information</para>
|
||||||
/// <para>房间注入处理器的配置信息</para>
|
/// <para>房间注入处理器的配置信息</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? Config { get; set; }
|
public string? Config { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
|
@ -18,9 +18,13 @@ public class RoomNodeData
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? RoomInjectionProcessorData { get; set; }
|
public string? RoomInjectionProcessorData { get; set; }
|
||||||
|
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? EnterRoomEventHandlerId { get; set; }
|
public string? EnterRoomEventHandlerId { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? ExitRoomEventHandlerId { get; set; }
|
public string? ExitRoomEventHandlerId { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Whether a tag is held</para>
|
/// <para>Whether a tag is held</para>
|
||||||
|
|
|
@ -223,7 +223,7 @@ public static class MapGenerator
|
||||||
{
|
{
|
||||||
var roomInjectionProcessorDataArray =
|
var roomInjectionProcessorDataArray =
|
||||||
YamlSerialization.Deserialize<RoomInjectionProcessorData[]>(roomInjectionProcessorData);
|
YamlSerialization.Deserialize<RoomInjectionProcessorData[]>(roomInjectionProcessorData);
|
||||||
if (roomInjectionProcessorDataArray.Length > 0)
|
if (roomInjectionProcessorDataArray is { Length: > 0 })
|
||||||
{
|
{
|
||||||
foreach (var injectionProcessorData in roomInjectionProcessorDataArray)
|
foreach (var injectionProcessorData in roomInjectionProcessorDataArray)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,5 +17,7 @@ public class AiCharacterGenerateEvent
|
||||||
/// <para>The Tag used to generate the role</para>
|
/// <para>The Tag used to generate the role</para>
|
||||||
/// <para>生成角色时使用的Tag</para>
|
/// <para>生成角色时使用的Tag</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? Tag { get; set; }
|
public string? Tag { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
|
@ -13,5 +13,7 @@ public class MapGenerationCompleteEvent
|
||||||
/// <para>Random number generator generated from seed</para>
|
/// <para>Random number generator generated from seed</para>
|
||||||
/// <para>根据种子生成的随机数生成器</para>
|
/// <para>根据种子生成的随机数生成器</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public RandomNumberGenerator? RandomNumberGenerator { get; set; }
|
public RandomNumberGenerator? RandomNumberGenerator { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
|
@ -8,5 +8,11 @@ namespace ColdMint.scripts.map.events;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PlayerInstanceChangeEvent
|
public class PlayerInstanceChangeEvent
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>New player instance</para>
|
||||||
|
/// <para>新的玩家实例</para>
|
||||||
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public Player? PlayerInstance { get; set; }
|
public Player? PlayerInstance { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
|
@ -18,5 +18,7 @@ public class SelectedItemSlotChangeEvent
|
||||||
/// <para>Lost the selected item slot</para>
|
/// <para>Lost the selected item slot</para>
|
||||||
/// <para>失去选中的物品槽</para>
|
/// <para>失去选中的物品槽</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public ItemSlotNode? OldItemSlotNode { get; set; }
|
public ItemSlotNode? OldItemSlotNode { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
|
@ -48,6 +48,8 @@ public class ChanceRoomInjectionProcessor : RoomInjectionProcessorTemplate<Chanc
|
||||||
///<para>The value ranges from 1 to 100. For example, if it is set to 1.5, it means that there is a 1.5% probability of generating this room.</para>
|
///<para>The value ranges from 1 to 100. For example, if it is set to 1.5, it means that there is a 1.5% probability of generating this room.</para>
|
||||||
///<para>支持小数,范围为1-100。例如,如果设置为1.5,则表示1.5%的概率生成此房间。</para>
|
///<para>支持小数,范围为1-100。例如,如果设置为1.5,则表示1.5%的概率生成此房间。</para>
|
||||||
/// </para>
|
/// </para>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public float? Chance { get; set; }
|
public float? Chance { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.Loader;
|
using System.Runtime.Loader;
|
||||||
using ColdMint.scripts.debug;
|
using ColdMint.scripts.debug;
|
||||||
using ColdMint.scripts.utils;
|
using ColdMint.scripts.utils;
|
||||||
|
|
|
@ -29,7 +29,9 @@ public class ModManifest
|
||||||
///<para>Allow relative paths, such as:... / Points to the parent directory.</para>
|
///<para>Allow relative paths, such as:... / Points to the parent directory.</para>
|
||||||
///<para>允许使用相对路径,例如: ../指向上级目录。</para>
|
///<para>允许使用相对路径,例如: ../指向上级目录。</para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string[]? DllList { get; set; }
|
public string[]? DllList { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Pck path list of mod</para>
|
/// <para>Pck path list of mod</para>
|
||||||
|
@ -39,7 +41,9 @@ public class ModManifest
|
||||||
///<para>Allow relative paths, such as:... / Points to the parent directory.</para>
|
///<para>Allow relative paths, such as:... / Points to the parent directory.</para>
|
||||||
///<para>允许使用相对路径,例如: ../指向上级目录。</para>
|
///<para>允许使用相对路径,例如: ../指向上级目录。</para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string[]? PckList { get; set; }
|
public string[]? PckList { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Creates module list information from a path</para>
|
/// <para>Creates module list information from a path</para>
|
||||||
|
|
|
@ -141,11 +141,15 @@ public class LogData
|
||||||
/// <para>message</para>
|
/// <para>message</para>
|
||||||
/// <para>消息</para>
|
/// <para>消息</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>level</para>
|
/// <para>level</para>
|
||||||
/// <para>错误等级</para>
|
/// <para>错误等级</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public int Level { get; set; }
|
public int Level { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@ namespace ColdMint.scripts.stateMachine.StateProcessor;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PatrolStateProcessor : StateProcessorTemplate
|
public class PatrolStateProcessor : StateProcessorTemplate
|
||||||
{
|
{
|
||||||
public Vector2[]? Points { get; set; }
|
public Vector2[]? Points { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Whether to guard the origin</para>
|
/// <para>Whether to guard the origin</para>
|
||||||
|
@ -21,7 +21,9 @@ public class PatrolStateProcessor : StateProcessorTemplate
|
||||||
///<para>When empty by default, PatrolStateProcessor will take the first point where the character touches the ground as the origin. This property handles whether or not the origin is "guarded" when the character is attracted to another character, such as chasing an enemy, and switches back to patrol mode. If set to true, the role tries to return to the origin, otherwise, a new origin is assigned.</para>
|
///<para>When empty by default, PatrolStateProcessor will take the first point where the character touches the ground as the origin. This property handles whether or not the origin is "guarded" when the character is attracted to another character, such as chasing an enemy, and switches back to patrol mode. If set to true, the role tries to return to the origin, otherwise, a new origin is assigned.</para>
|
||||||
///<para>默认清空下,PatrolStateProcessor会将角色与地面接触的第一个位置当作原点。这个属性用来处理当角色被其他角色所吸引,(例如追击敌人)转换回巡逻模式,是否“守护”原点。如果设置为true,则角色会尝试返回原点,否则,将分配新的原点。</para>
|
///<para>默认清空下,PatrolStateProcessor会将角色与地面接触的第一个位置当作原点。这个属性用来处理当角色被其他角色所吸引,(例如追击敌人)转换回巡逻模式,是否“守护”原点。如果设置为true,则角色会尝试返回原点,否则,将分配新的原点。</para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||||
public bool Guard { get; set; }
|
public bool Guard { get; set; }
|
||||||
|
// ReSharper restore UnusedAutoPropertyAccessor.Global
|
||||||
|
|
||||||
private int _index;
|
private int _index;
|
||||||
private Vector2? _originPosition;
|
private Vector2? _originPosition;
|
||||||
|
@ -47,15 +49,7 @@ public class PatrolStateProcessor : StateProcessorTemplate
|
||||||
{
|
{
|
||||||
//Once the enemy enters the reconnaissance range, we first see if the character has a weapon, if so, then pursue the enemy, otherwise, the patrol state changes to looking for weapons.
|
//Once the enemy enters the reconnaissance range, we first see if the character has a weapon, if so, then pursue the enemy, otherwise, the patrol state changes to looking for weapons.
|
||||||
//发现敌人进入侦察范围后,我们先看角色是否持有武器,如果有,那么追击敌人,否则,巡逻状态转换为寻找武器。
|
//发现敌人进入侦察范围后,我们先看角色是否持有武器,如果有,那么追击敌人,否则,巡逻状态转换为寻找武器。
|
||||||
if (aiCharacter.CurrentItem is WeaponTemplate)
|
context.CurrentState = aiCharacter.CurrentItem is WeaponTemplate ? State.Chase : State.LookForWeapon;
|
||||||
{
|
|
||||||
context.CurrentState = State.Chase;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
context.CurrentState = State.LookForWeapon;
|
|
||||||
}
|
|
||||||
|
|
||||||
LogCat.Log("patrol_enemy_detected", label: LogCat.LogLabel.PatrolStateProcessor);
|
LogCat.Log("patrol_enemy_detected", label: LogCat.LogLabel.PatrolStateProcessor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using ColdMint.scripts.debug;
|
using ColdMint.scripts.debug;
|
||||||
using ColdMint.scripts.projectile;
|
using ColdMint.scripts.projectile;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
@ -46,7 +45,7 @@ public static class NodeUtils
|
||||||
/// <param name="childNode"></param>
|
/// <param name="childNode"></param>
|
||||||
public static void CallDeferredReparent(Node parentNode, Node childNode)
|
public static void CallDeferredReparent(Node parentNode, Node childNode)
|
||||||
{
|
{
|
||||||
childNode.CallDeferred("reparent", parentNode);
|
childNode.CallDeferred(Node.MethodName.Reparent, parentNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,17 +151,6 @@ public static class NodeUtils
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <para>All child nodes are removed asynchronously</para>
|
|
||||||
/// <para>异步删除所有子节点</para>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="parent"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static async Task<int> DeleteAllChildAsync(Node parent)
|
|
||||||
{
|
|
||||||
return await Task.Run(() => DeleteAllChild(parent));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Gets the node closest to the origin</para>
|
/// <para>Gets the node closest to the origin</para>
|
||||||
/// <para>获取距离原点最近的节点</para>
|
/// <para>获取距离原点最近的节点</para>
|
||||||
|
@ -284,7 +272,7 @@ public static class NodeUtils
|
||||||
if (node is T result) return result;
|
if (node is T result) return result;
|
||||||
// If the transformation fails, release the created node
|
// If the transformation fails, release the created node
|
||||||
//如果转型失败,释放所创建的节点
|
//如果转型失败,释放所创建的节点
|
||||||
LogCat.LogWarningWithFormat("warning_node_cannot_cast_to", LogCat.LogLabel.Default,LogCat.UploadFormat, node,
|
LogCat.LogWarningWithFormat("warning_node_cannot_cast_to", LogCat.LogLabel.Default, LogCat.UploadFormat, node,
|
||||||
nameof(T));
|
nameof(T));
|
||||||
node.QueueFree();
|
node.QueueFree();
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user