diff --git a/.cursorrules b/.cursorrules new file mode 100644 index 0000000..ec908e3 --- /dev/null +++ b/.cursorrules @@ -0,0 +1,65 @@ + +# Cursor Rules + +You are an expert in C#, Unity, and scalable game development. + + Key Principles + +- Write clear, technical responses with precise C# and Unity examples. +- Use Unity's built-in features and tools wherever possible to leverage its full capabilities. +- Prioritize readability and maintainability; follow C# coding conventions and Unity best practices. +- Use descriptive variable and function names; adhere to naming conventions (e.g., PascalCase for public members, camelCase for private members). +- Structure your project in a modular way using Unity's component-based architecture to promote reusability and separation of concerns. + + C#/Unity + +- Use MonoBehaviour for script components attached to GameObjects; prefer ScriptableObjects for data containers and shared resources. +- Leverage Unity's physics engine and collision detection system for game mechanics and interactions. +- Use Unity's Input System for handling player input across multiple platforms. +- Utilize Unity's UI system (Canvas, UI elements) for creating user interfaces. +- Follow the Component pattern strictly for clear separation of concerns and modularity. +- Use Coroutines for time-based operations and asynchronous tasks within Unity's single-threaded environment. +- Use System.Console for logging and debugging in the console. +- Using C# 9.0 features. + + Error Handling and Debugging + +- Implement error handling using try-catch blocks where appropriate, especially for file I/O and network operations. +- Use Unity's Debug class for logging and debugging (e.g., Debug.Log, Debug.LogWarning, Debug.LogError). +- Utilize Unity's profiler and frame debugger to identify and resolve performance issues. +- Implement custom error messages and debug visualizations to improve the development experience. +- Use Unity's assertion system (Debug.Assert) to catch logical errors during development. + + Dependencies + +- Unity Engine +- .NET Framework (version compatible with your Unity version) +- Unity Asset Store packages (as needed for specific functionality) +- Third-party plugins (carefully vetted for compatibility and performance) + + Unity-Specific Guidelines + +- Use Prefabs for reusable game objects and UI elements. +- Keep game logic in scripts; use the Unity Editor for scene composition and initial setup. +- Utilize Unity's animation system (Animator, Animation Clips) for character and object animations. +- Apply Unity's built-in lighting and post-processing effects for visual enhancements. +- Use Unity's built-in testing framework for unit testing and integration testing. +- Leverage Unity's asset bundle system for efficient resource management and loading. +- Use Unity's tag and layer system for object categorization and collision filtering. + + Performance Optimization + +- Use object pooling for frequently instantiated and destroyed objects. +- Optimize draw calls by batching materials and using atlases for sprites and UI elements. +- Implement level of detail (LOD) systems for complex 3D models to improve rendering performance. +- Use Unity's Job System and Burst Compiler for CPU-intensive operations. +- Optimize physics performance by using simplified collision meshes and adjusting fixed timestep. + + Key Conventions + + 1. Follow Unity's component-based architecture for modular and reusable game elements. + 2. Prioritize performance optimization and memory management in every stage of development. + 3. Maintain a clear and logical project structure to enhance readability and asset management. + + Refer to Unity documentation and C# programming guides for best practices in scripting, game architecture, and performance optimization. + \ No newline at end of file diff --git a/ActiveProtect.csproj b/ActiveProtect.csproj index 206b89a..d579445 100644 --- a/ActiveProtect.csproj +++ b/ActiveProtect.csproj @@ -2,8 +2,9 @@ Exe - net8.0 - enable + net6.0 + 9.0 + disable enable diff --git a/Models/Common.cs b/Models/Common.cs index 28e4a52..01b946a 100644 --- a/Models/Common.cs +++ b/Models/Common.cs @@ -5,28 +5,38 @@ namespace ActiveProtect.Models /// /// 表示三维空间中的向量 /// - public class Vector3D(double x, double y, double z) + public class Vector3D { // 添加静态单位向量属性 - public static Vector3D UnitX => new(1, 0, 0); - public static Vector3D UnitY => new(0, 1, 0); - public static Vector3D UnitZ => new(0, 0, 1); - public static Vector3D Zero => new(0, 0, 0); + public static Vector3D UnitX => new Vector3D(1, 0, 0); + public static Vector3D UnitY => new Vector3D(0, 1, 0); + public static Vector3D UnitZ => new Vector3D(0, 0, 1); + public static Vector3D Zero => new Vector3D(0, 0, 0); /// /// X 坐标 /// - public double X { get; set; } = x; + public double X { get; set; } /// /// Y 坐标 /// - public double Y { get; set; } = y; + public double Y { get; set; } /// /// Z 坐标 /// - public double Z { get; set; } = z; + public double Z { get; set; } + + /// + /// 构造函数 + /// + public Vector3D(double x, double y, double z) + { + X = x; + Y = y; + Z = z; + } /// /// 计算两个向量之间的距离 @@ -161,22 +171,32 @@ namespace ActiveProtect.Models /// /// 表示三维空间中的方向 /// - public struct Orientation(double yaw, double pitch, double roll) + public struct Orientation { /// /// 偏航角(绕Y轴旋转) /// - public double Yaw { get; set; } = yaw; + public double Yaw { get; set; } /// /// 俯仰角(绕X轴旋转) /// - public double Pitch { get; set; } = pitch; + public double Pitch { get; set; } /// /// 滚转角(绕Z轴旋转) /// - public double Roll { get; set; } = roll; + public double Roll { get; set; } + + /// + /// 构造函数 + /// + public Orientation(double yaw, double pitch, double roll) + { + Yaw = yaw; + Pitch = pitch; + Roll = roll; + } /// /// 将方向转换为字符串表示 @@ -272,6 +292,6 @@ namespace ActiveProtect.Models Y = y; } - public static Vector2D Zero => new(0, 0); + public static Vector2D Zero => new Vector2D(0, 0); } } diff --git a/Models/ILaserIlluminatable.cs b/Models/ILaserIlluminatable.cs deleted file mode 100644 index f5994ef..0000000 --- a/Models/ILaserIlluminatable.cs +++ /dev/null @@ -1,30 +0,0 @@ -using ActiveProtect.SimulationEnvironment; - -namespace ActiveProtect.Models -{ - /// - /// 定义可被激光照射的实体接口 - /// - public interface ILaserIlluminatable - { - /// - /// 获取实体是否正在被激光照射 - /// - bool IsIlluminated { get; } - - /// - /// 开始激光照射 - /// - void Illuminate(); - - /// - /// 停止激光照射 - /// - void StopIllumination(); - - /// - /// 获取实体的位置 - /// - Vector3D Position { get; } - } -} diff --git a/Models/LaserBeamRiderMissile.cs b/Models/LaserBeamRiderMissile.cs index f5dff36..f2b4027 100644 --- a/Models/LaserBeamRiderMissile.cs +++ b/Models/LaserBeamRiderMissile.cs @@ -1,6 +1,4 @@ using ActiveProtect.SimulationEnvironment; -using System; -using System.Formats.Tar; namespace ActiveProtect.Models { @@ -23,17 +21,26 @@ namespace ActiveProtect.Models private void OnLaserBeamStart(LaserBeamStartEvent evt) { - LaserBeamRiderGuidanceSystem.ActivateLaserBeam(evt.LaserBeamRider.Position, evt.LaserBeamRider.LaserDirection, evt.LaserBeamRider.LaserPower); + if (evt?.LaserBeamRider != null) + { + LaserBeamRiderGuidanceSystem?.ActivateLaserBeam(evt.LaserBeamRider.Position, evt.LaserBeamRider.LaserDirection, evt.LaserBeamRider.LaserPower); + } } private void OnLaserBeamUpdate(LaserBeamUpdateEvent evt) { - LaserBeamRiderGuidanceSystem.UpdateLaserBeamRider(evt.LaserBeamRider.Position, evt.LaserBeamRider.LaserDirection, evt.LaserBeamRider.LaserPower); + if (evt?.LaserBeamRider != null) + { + LaserBeamRiderGuidanceSystem?.UpdateLaserBeamRider(evt.LaserBeamRider.Position, evt.LaserBeamRider.LaserDirection, evt.LaserBeamRider.LaserPower); + } } private void OnLaserBeamStop(LaserBeamStopEvent evt) { - LaserBeamRiderGuidanceSystem.DeactivateLaserBeam(evt.LaserBeamRider.Position, evt.LaserBeamRider.LaserDirection); + if (evt?.LaserBeamRider != null) + { + LaserBeamRiderGuidanceSystem?.DeactivateLaserBeam(evt.LaserBeamRider.Position, evt.LaserBeamRider.LaserDirection); + } } public override void Update(double deltaTime) diff --git a/Models/LaserSemiActiveGuidedMissile.cs b/Models/LaserSemiActiveGuidedMissile.cs index 14de309..50036e2 100644 --- a/Models/LaserSemiActiveGuidedMissile.cs +++ b/Models/LaserSemiActiveGuidedMissile.cs @@ -38,8 +38,11 @@ namespace ActiveProtect.Models /// 激光照射事件 private void OnLaserIlluminationStart(LaserIlluminationStartEvent evt) { - LaserGuidanceSystem.ActivateLaserDesignator(evt.LaserDesignator.Position, evt.Target.Position, evt.Target.Velocity, - evt.LaserDesignator.LaserPower, evt.LaserDesignator.LaserDivergenceAngle); + if (evt?.LaserDesignator != null && evt?.Target != null) + { + LaserGuidanceSystem.ActivateLaserDesignator(evt.LaserDesignator.Position, evt.Target.Position, evt.Target.Velocity, + evt.LaserDesignator.LaserPower, evt.LaserDesignator.LaserDivergenceAngle); + } } /// @@ -48,8 +51,11 @@ namespace ActiveProtect.Models /// 激光照射更新事件 private void OnLaserIlluminationUpdate(LaserIlluminationUpdateEvent evt) { - LaserGuidanceSystem.UpdateLaserDesignator(evt.LaserDesignator.Position, evt.Target.Position, evt.Target.Velocity, - evt.LaserDesignator.LaserPower, evt.LaserDesignator.LaserDivergenceAngle); + if (evt?.LaserDesignator != null && evt?.Target != null) + { + LaserGuidanceSystem.UpdateLaserDesignator(evt.LaserDesignator.Position, evt.Target.Position, evt.Target.Velocity, + evt.LaserDesignator.LaserPower, evt.LaserDesignator.LaserDivergenceAngle); + } } /// diff --git a/Models/LaserWarner.cs b/Models/LaserWarner.cs index 3399136..04b1082 100644 --- a/Models/LaserWarner.cs +++ b/Models/LaserWarner.cs @@ -78,7 +78,7 @@ namespace ActiveProtect.Models /// 激光照射事件 private void OnLaserIlluminationStart(LaserIlluminationStartEvent evt) { - if (evt.Target.Id == MonitoredEntityId) + if (evt?.Target != null && evt.Target.Id == MonitoredEntityId) { TriggerAlarm(); } @@ -90,7 +90,7 @@ namespace ActiveProtect.Models /// 激光照射停止事件 private void OnLaserIlluminationStop(LaserIlluminationStopEvent evt) { - if (evt.Target.Id == MonitoredEntityId) + if (evt?.Target != null && evt.Target.Id == MonitoredEntityId) { StopAlarm(); } diff --git a/Models/MissileBase.cs b/Models/MissileBase.cs index 606e4d9..5ba575e 100644 --- a/Models/MissileBase.cs +++ b/Models/MissileBase.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using ActiveProtect.SimulationEnvironment; using Model; @@ -360,7 +361,7 @@ namespace ActiveProtect.Models /// private void TryChangeToNextAvailableStage(FlightStage startStage) { - FlightStage[] stageOrder = [FlightStage.Launch, FlightStage.Acceleration, FlightStage.Cruise, FlightStage.TerminalGuidance, FlightStage.Attack]; + FlightStage[] stageOrder = new FlightStage[] {FlightStage.Launch, FlightStage.Acceleration, FlightStage.Cruise, FlightStage.TerminalGuidance, FlightStage.Attack}; int startIndex = Array.IndexOf(stageOrder, startStage); for (int i = startIndex + 1; i < stageOrder.Length; i++) diff --git a/Models/MissileStageStrategy.cs b/Models/MissileStageStrategy.cs index ff37567..5b2a05d 100644 --- a/Models/MissileStageStrategy.cs +++ b/Models/MissileStageStrategy.cs @@ -1,4 +1,6 @@ +using System; + namespace ActiveProtect.Models { /// @@ -45,12 +47,18 @@ namespace ActiveProtect.Models } } + /// /// /// 加速阶段策略 /// - public class AccelerationStageStrategy(MissileBase missile) : IMissileStageStrategy + public class AccelerationStageStrategy : IMissileStageStrategy { - private readonly MissileBase missile = missile; + private readonly MissileBase missile; + + public AccelerationStageStrategy(MissileBase missile) + { + this.missile = missile; + } public void Update(double deltaTime) { @@ -64,9 +72,14 @@ namespace ActiveProtect.Models /// /// 巡航阶段策略 /// - public class CruiseStageStrategy(MissileBase missile) : IMissileStageStrategy + public class CruiseStageStrategy : IMissileStageStrategy { - private readonly MissileBase missile = missile; + private readonly MissileBase missile; + + public CruiseStageStrategy(MissileBase missile) + { + this.missile = missile; + } public void Update(double deltaTime) { @@ -80,9 +93,14 @@ namespace ActiveProtect.Models /// /// 终端制导阶段策略 /// - public class TerminalGuidanceStageStrategy(MissileBase missile) : IMissileStageStrategy + public class TerminalGuidanceStageStrategy : IMissileStageStrategy { - private readonly MissileBase missile = missile; + private readonly MissileBase missile; + + public TerminalGuidanceStageStrategy(MissileBase missile) + { + this.missile = missile; + } public void Update(double deltaTime) { @@ -96,9 +114,14 @@ namespace ActiveProtect.Models /// /// 攻击阶段策略 /// - public class AttackStageStrategy(MissileBase missile) : IMissileStageStrategy + public class AttackStageStrategy : IMissileStageStrategy { - private readonly MissileBase missile = missile; + private readonly MissileBase missile; + + public AttackStageStrategy(MissileBase missile) + { + this.missile = missile; + } public void Update(double deltaTime) { @@ -112,9 +135,14 @@ namespace ActiveProtect.Models /// /// 无制导阶段策略 /// - public class UnguidedStageStrategy(MissileBase missile) : IMissileStageStrategy + public class UnguidedStageStrategy : IMissileStageStrategy { - private readonly MissileBase missile = missile; + private readonly MissileBase missile; + + public UnguidedStageStrategy(MissileBase missile) + { + this.missile = missile; + } public void Update(double deltaTime) { diff --git a/Models/Tank.cs b/Models/Tank.cs index a6e5ad5..71ff327 100644 --- a/Models/Tank.cs +++ b/Models/Tank.cs @@ -6,28 +6,42 @@ namespace ActiveProtect.Models /// /// 表示仿真中的坦克 /// - public class Tank(string id, TankConfig tankConfig, ISimulationManager simulationManager) - : SimulationElement(id, tankConfig.InitialPosition, tankConfig.InitialOrientation, simulationManager) + public class Tank : SimulationElement { /// /// 当前速度(米/秒) /// - public double Speed { get; set; } = tankConfig.InitialSpeed; + public double Speed { get; set; } /// /// 最大速度(米/秒) /// - public double MaxSpeed { get; private set; } = tankConfig.MaxSpeed; + public double MaxSpeed { get; private set; } /// /// 最大装甲值 /// - public double MaxArmor { get; private set; } = tankConfig.MaxArmor; + public double MaxArmor { get; private set; } /// /// 当前装甲值 /// - public double CurrentArmor { get; private set; } = tankConfig.MaxArmor; + public double CurrentArmor { get; private set; } + + /// + /// 构造函数 + /// + /// 坦克ID + /// 坦克配置 + /// 仿真管理器 + public Tank(string id, TankConfig tankConfig, ISimulationManager simulationManager) + : base(id, tankConfig.InitialPosition, tankConfig.InitialOrientation, simulationManager) + { + Speed = tankConfig.InitialSpeed; + MaxSpeed = tankConfig.MaxSpeed; + MaxArmor = tankConfig.MaxArmor; + CurrentArmor = tankConfig.MaxArmor; + } /// /// 更新坦克状态 diff --git a/Program.cs b/Program.cs index 815e251..61817a7 100644 --- a/Program.cs +++ b/Program.cs @@ -4,6 +4,7 @@ using ActiveProtect.SimulationEnvironment; using ActiveProtect.Models; using Model; using System.Security.Cryptography.X509Certificates; +using System.Collections.Generic; namespace ActiveProtect { @@ -32,9 +33,10 @@ namespace ActiveProtect var config = new SimulationConfig { // 配置坦克 - TankConfigs = - [ - new(tankinfo) { + TankConfigs = new List + { + new TankConfig(tankinfo) + { InitialOrientation = new Orientation(Math.PI/4, 0, 0), InitialSpeed = 15, MaxSpeed = 20, @@ -42,7 +44,7 @@ namespace ActiveProtect HasLaserWarner = false, HasLaserJammer = true } - ], + }, // 配置激光指示器 LaserDesignatorConfig = new LaserDesignatorConfig { @@ -71,69 +73,19 @@ namespace ActiveProtect ControlFieldDiameter = 6 }, // 配置导弹 - MissileConfigs = - [ - // 标准导弹配置 - // new(mIniInfo) { - // MaxSpeed = 300, - // TargetIndex = 0, - // MaxFlightTime = 0.5, - // MaxFlightDistance = 3000, - // ThrustAcceleration = 50, - // MaxEngineBurnTime = 10, - // MaxAcceleration = 100, - // ProportionalNavigationCoefficient = 3, - // StageConfig = FlightStageConfig.StandardMissile, - // DistanceParams = new MissileDistanceParams(500, 100, 20), - // Mass = 50, - // Type = MissileType.StandardMissile, - // }, - // // 红外指令制导导弹配置 - // new() { - // InitialPosition = new Vector3D(2000, 150, 100), - // InitialOrientation = new Orientation(Math.PI, -0.15, 0), - // InitialSpeed = 0, - // MaxSpeed = 300, - // TargetIndex = 0, - // MaxFlightTime = 1, - // MaxFlightDistance = 5000, - // ThrustAcceleration = 50, - // MaxEngineBurnTime = 10, - // MaxAcceleration = 100, - // ProportionalNavigationCoefficient = 3, - // StageConfig = FlightStageConfig.InfraredCommandGuidance, - // DistanceParams = new MissileDistanceParams(500, 100, 20), - // Mass = 50, - // Type = MissileType.InfraredCommandGuidance - // }, - // // 毫米波终端制导导弹配置 - // new() { - // InitialPosition = new Vector3D(2000, 50, 100), - // InitialOrientation = new Orientation(Math.PI, -0.05, 0), - // InitialSpeed = 0, - // MaxSpeed = 300, - // TargetIndex = 0, - // MaxFlightTime = 0.5, - // MaxFlightDistance = 3000, - // ThrustAcceleration = 50, - // MaxEngineBurnTime = 10, - // MaxAcceleration = 100, - // ProportionalNavigationCoefficient = 3, - // StageConfig = FlightStageConfig.MillimeterWaveTerminalGuidance, - // DistanceParams = new MissileDistanceParams(500, 100, 20), - // Mass = 50, - // Type = MissileType.MillimeterWaveTerminalGuidance - // }, + MissileConfigs = new List + { // 激光半主动制导导弹配置 - new() { - InitialPosition = new Vector3D(2000, 100, 100), - InitialOrientation = new Orientation(Math.PI, -0.1, 0), // 调整初始俯仰角 - InitialSpeed = 700, + new MissileConfig + { + InitialPosition = new Vector3D(2000, 100, 100), + InitialOrientation = new Orientation(Math.PI, -0.1, 0), + InitialSpeed = 700, MaxSpeed = 800, TargetIndex = 0, - MaxFlightTime = 0.5, // 增加最大飞行时间 + MaxFlightTime = 0.05, MaxFlightDistance = 5000, - ThrustAcceleration = 50, // 添加推力加速度 + ThrustAcceleration = 50, MaxEngineBurnTime = 10, MaxAcceleration = 400, ProportionalNavigationCoefficient = 3, @@ -143,15 +95,16 @@ namespace ActiveProtect Type = MissileType.LaserSemiActiveGuidance }, // 激光驾束制导导弹配置 - new() { - InitialPosition = new Vector3D(2000, 10, 100), - InitialOrientation = new Orientation(Math.PI, 0.1, 0.0), // 调整初始俯仰角 - InitialSpeed = 300, + new MissileConfig + { + InitialPosition = new Vector3D(2000, 10, 100), + InitialOrientation = new Orientation(Math.PI, 0.1, 0.0), + InitialSpeed = 300, MaxSpeed = 400, TargetIndex = 0, - MaxFlightTime = 10, // 增加最大飞行时间 + MaxFlightTime = 0.05, MaxFlightDistance = 3000, - ThrustAcceleration = 50, // 添加推力加速度 + ThrustAcceleration = 50, MaxEngineBurnTime = 10, MaxAcceleration = 400, ProportionalNavigationCoefficient = 3, @@ -160,7 +113,7 @@ namespace ActiveProtect Mass = 50, Type = MissileType.LaserBeamRiderGuidance } - ], + }, SimulationTimeStep = 0.025 }; diff --git a/SimulationEnvironment/SimulationConfig.cs b/SimulationEnvironment/SimulationConfig.cs index 80bae84..57061b0 100644 --- a/SimulationEnvironment/SimulationConfig.cs +++ b/SimulationEnvironment/SimulationConfig.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.ComponentModel; using ActiveProtect.Models; using Model; @@ -49,8 +50,8 @@ namespace ActiveProtect.SimulationEnvironment /// public SimulationConfig() { - TankConfigs = []; - MissileConfigs = []; + TankConfigs = new List(); + MissileConfigs = new List(); LaserDesignatorConfig = new LaserDesignatorConfig(); LaserBeamRiderConfig = new LaserBeamRiderConfig(); LaserWarnerConfig = new LaserWarnerConfig(); @@ -325,35 +326,55 @@ namespace ActiveProtect.SimulationEnvironment /// /// 导弹距离参数结构 /// - public struct MissileDistanceParams(double terminalGuidanceDistance, double attackDistance, double explosionDistance) + public struct MissileDistanceParams { /// /// 终端制导距离(米) /// - public double TerminalGuidanceDistance { get; set; } = terminalGuidanceDistance; - + public double TerminalGuidanceDistance; /// /// 攻击距离(米) /// - public double AttackDistance { get; set; } = attackDistance; - + public double AttackDistance; /// /// 爆炸距离(米) /// - public double ExplosionDistance { get; set; } = explosionDistance; + public double ExplosionDistance; + + public MissileDistanceParams(double terminalGuidanceDistance, double attackDistance, double explosionDistance) + { + TerminalGuidanceDistance = terminalGuidanceDistance; + AttackDistance = attackDistance; + ExplosionDistance = explosionDistance; + } } + /// /// /// 导弹飞行阶段配置结构 /// - public struct FlightStageConfig(bool enableLaunch = true, bool enableAcceleration = true, bool enableCruise = true, - bool enableTerminalGuidance = true, bool enableAttack = true) + public struct FlightStageConfig { - public bool EnableLaunch = enableLaunch; - public bool EnableAcceleration = enableAcceleration; - public bool EnableCruise = enableCruise; - public bool EnableTerminalGuidance = enableTerminalGuidance; - public bool EnableAttack = enableAttack; + /// + /// 启用发射阶段 + /// + public bool EnableLaunch; + /// + /// 启用加速阶段 + /// + public bool EnableAcceleration; + /// + /// 启用巡航阶段 + /// + public bool EnableCruise; + /// + /// 启用终端制导阶段 + /// + public bool EnableTerminalGuidance; + /// + /// 启用攻击阶段 + /// + public bool EnableAttack; /// /// 标准导弹的预设配置, 所有阶段都启用 @@ -384,6 +405,15 @@ namespace ActiveProtect.SimulationEnvironment /// 毫米波末制导导弹的预设配置 /// public static FlightStageConfig MillimeterWaveTerminalGuidance => new(true, true, true, true, true); + + public FlightStageConfig(bool enableLaunch, bool enableAcceleration, bool enableCruise, bool enableTerminalGuidance, bool enableAttack) + { + EnableLaunch = enableLaunch; + EnableAcceleration = enableAcceleration; + EnableCruise = enableCruise; + EnableTerminalGuidance = enableTerminalGuidance; + EnableAttack = enableAttack; + } } /// diff --git a/SimulationEnvironment/SimulationElement.cs b/SimulationEnvironment/SimulationElement.cs index d0e5dc9..8323d37 100644 --- a/SimulationEnvironment/SimulationElement.cs +++ b/SimulationEnvironment/SimulationElement.cs @@ -5,37 +5,54 @@ namespace ActiveProtect.SimulationEnvironment /// /// 仿真元素的抽象基类,所有仿真中的实体都继承自此类 /// - public abstract class SimulationElement(string id, Vector3D position, Orientation orientation, ISimulationManager simulationManager) + public abstract class SimulationElement { /// /// 仿真元素的唯一标识符 /// - public virtual string Id { get; set; } = id; + public virtual string Id { get; set; } /// /// 仿真元素的当前位置 /// - public virtual Vector3D Position { get; set; } = position; + public virtual Vector3D Position { get; set; } /// /// 仿真元素的当前速度 /// - public virtual Vector3D Velocity { get; set; } = Vector3D.Zero; + public virtual Vector3D Velocity { get; set; } /// /// 仿真元素的当前朝向 /// - public virtual Orientation Orientation { get; set; } = orientation; + public virtual Orientation Orientation { get; set; } /// /// 仿真元素是否处于活动状态 /// - public virtual bool IsActive { get; protected set; } = true; + public virtual bool IsActive { get; protected set; } /// /// 仿真管理器的引用 /// - public ISimulationManager SimulationManager { get; set; } = simulationManager; + public ISimulationManager SimulationManager { get; set; } + + /// + /// 构造函数 + /// + /// 仿真元素的唯一标识符 + /// 初始位置 + /// 初始朝向 + /// 仿真管理器 + protected SimulationElement(string id, Vector3D position, Orientation orientation, ISimulationManager simulationManager) + { + Id = id; + Position = position; + Orientation = orientation; + SimulationManager = simulationManager; + Velocity = Vector3D.Zero; + IsActive = true; + } /// /// 更新仿真元素的状态 diff --git a/SimulationEnvironment/SimulationEvents.cs b/SimulationEnvironment/SimulationEvents.cs index a9a5171..3f5e1ee 100644 --- a/SimulationEnvironment/SimulationEvents.cs +++ b/SimulationEnvironment/SimulationEvents.cs @@ -34,17 +34,32 @@ namespace ActiveProtect.SimulationEnvironment /// public class LaserIlluminationStartEvent : SimulationEvent { - public required LaserDesignator LaserDesignator { get; set; } - public required SimulationElement Target { get; set; } + /// + /// 激光定位器 + /// + public LaserDesignator? LaserDesignator { get; set; } + + /// + /// 目标元素 + /// + public SimulationElement? Target { get; set; } } /// /// 激光照射更新事件 /// public class LaserIlluminationUpdateEvent : SimulationEvent { - public required LaserDesignator LaserDesignator { get; set; } - public required SimulationElement Target { get; set; } + /// + /// 激光定位器 + /// + public LaserDesignator? LaserDesignator { get; set; } + + /// + /// 目标元素 + /// + public SimulationElement? Target { get; set; } } /// public class LaserIlluminationStopEvent : SimulationEvent { - public required LaserDesignator LaserDesignator { get; set; } - public required SimulationElement Target { get; set; } + public LaserDesignator? LaserDesignator { get; set; } + public SimulationElement? Target { get; set; } } /// @@ -135,7 +150,7 @@ namespace ActiveProtect.SimulationEnvironment /// public class LaserBeamStartEvent : SimulationEvent { - public required LaserBeamRider LaserBeamRider { get; set; } + public LaserBeamRider? LaserBeamRider { get; set; } } /// @@ -143,7 +158,7 @@ namespace ActiveProtect.SimulationEnvironment /// public class LaserBeamUpdateEvent : SimulationEvent { - public required LaserBeamRider LaserBeamRider { get; set; } + public LaserBeamRider? LaserBeamRider { get; set; } } /// @@ -151,6 +166,6 @@ namespace ActiveProtect.SimulationEnvironment /// public class LaserBeamStopEvent : SimulationEvent { - public required LaserBeamRider LaserBeamRider { get; set; } + public LaserBeamRider? LaserBeamRider { get; set; } } } diff --git a/SimulationEnvironment/SimulationManager.cs b/SimulationEnvironment/SimulationManager.cs index 3cd240a..b35a6f9 100644 --- a/SimulationEnvironment/SimulationManager.cs +++ b/SimulationEnvironment/SimulationManager.cs @@ -81,7 +81,7 @@ namespace ActiveProtect.SimulationEnvironment public SimulationManager(SimulationConfig config) { this.config = config; - Elements = []; + Elements = new List(); CurrentTime = 0; IsSimulationEnded = false; InitializeSimulation(); @@ -232,7 +232,7 @@ namespace ActiveProtect.SimulationEnvironment var eventType = typeof(T); if (!eventHandlers.TryGetValue(eventType, out List? value)) { - value = []; + value = new List(); eventHandlers[eventType] = value; } @@ -244,7 +244,7 @@ namespace ActiveProtect.SimulationEnvironment { if (!elementSubscriptions.TryGetValue(element, out List<(Type, Delegate)>? subscriptions)) { - subscriptions = []; + subscriptions = new List<(Type, Delegate)>(); elementSubscriptions[element] = subscriptions; } diff --git a/bin/Debug/net6.0/ActiveProtect b/bin/Debug/net6.0/ActiveProtect new file mode 100755 index 0000000..139155c Binary files /dev/null and b/bin/Debug/net6.0/ActiveProtect differ diff --git a/bin/Debug/net6.0/ActiveProtect.deps.json b/bin/Debug/net6.0/ActiveProtect.deps.json new file mode 100644 index 0000000..bcda9c1 --- /dev/null +++ b/bin/Debug/net6.0/ActiveProtect.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "ActiveProtect/1.0.0": { + "runtime": { + "ActiveProtect.dll": {} + } + } + } + }, + "libraries": { + "ActiveProtect/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/bin/Debug/net6.0/ActiveProtect.dll b/bin/Debug/net6.0/ActiveProtect.dll new file mode 100644 index 0000000..6ec90c2 Binary files /dev/null and b/bin/Debug/net6.0/ActiveProtect.dll differ diff --git a/bin/Debug/net6.0/ActiveProtect.pdb b/bin/Debug/net6.0/ActiveProtect.pdb new file mode 100644 index 0000000..779b052 Binary files /dev/null and b/bin/Debug/net6.0/ActiveProtect.pdb differ diff --git a/bin/Debug/net6.0/ActiveProtect.runtimeconfig.json b/bin/Debug/net6.0/ActiveProtect.runtimeconfig.json new file mode 100644 index 0000000..4986d16 --- /dev/null +++ b/bin/Debug/net6.0/ActiveProtect.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "net6.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "6.0.0" + } + } +} \ No newline at end of file diff --git a/bin/Debug/netstandard2.1/ActiveProtect.deps.json b/bin/Debug/netstandard2.1/ActiveProtect.deps.json new file mode 100644 index 0000000..0a7ddc3 --- /dev/null +++ b/bin/Debug/netstandard2.1/ActiveProtect.deps.json @@ -0,0 +1,24 @@ +{ + "runtimeTarget": { + "name": ".NETStandard,Version=v2.1/", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETStandard,Version=v2.1": {}, + ".NETStandard,Version=v2.1/": { + "ActiveProtect/1.0.0": { + "runtime": { + "ActiveProtect.dll": {} + } + } + } + }, + "libraries": { + "ActiveProtect/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/bin/Debug/netstandard2.1/ActiveProtect.dll b/bin/Debug/netstandard2.1/ActiveProtect.dll new file mode 100644 index 0000000..0dfaa44 Binary files /dev/null and b/bin/Debug/netstandard2.1/ActiveProtect.dll differ diff --git a/bin/Debug/netstandard2.1/ActiveProtect.pdb b/bin/Debug/netstandard2.1/ActiveProtect.pdb new file mode 100644 index 0000000..f45ab76 Binary files /dev/null and b/bin/Debug/netstandard2.1/ActiveProtect.pdb differ diff --git a/obj/ActiveProtect.csproj.nuget.dgspec.json b/obj/ActiveProtect.csproj.nuget.dgspec.json index 8a20935..35d8a3d 100644 --- a/obj/ActiveProtect.csproj.nuget.dgspec.json +++ b/obj/ActiveProtect.csproj.nuget.dgspec.json @@ -17,14 +17,14 @@ "/Users/tianjianyong/.nuget/NuGet/NuGet.Config" ], "originalTargetFrameworks": [ - "net8.0" + "net6.0" ], "sources": { "https://api.nuget.org/v3/index.json": {} }, "frameworks": { - "net8.0": { - "targetAlias": "net8.0", + "net6.0": { + "targetAlias": "net6.0", "projectReferences": {} } }, @@ -40,8 +40,8 @@ } }, "frameworks": { - "net8.0": { - "targetAlias": "net8.0", + "net6.0": { + "targetAlias": "net6.0", "imports": [ "net461", "net462", @@ -53,12 +53,26 @@ ], "assetTargetFallback": true, "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[6.0.33, 6.0.33]" + }, + { + "name": "Microsoft.NETCore.App.Host.osx-arm64", + "version": "[6.0.33, 6.0.33]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[6.0.33, 6.0.33]" + } + ], "frameworkReferences": { "Microsoft.NETCore.App": { "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/8.0.402/PortableRuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/8.0.402/RuntimeIdentifierGraph.json" } } } diff --git a/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs new file mode 100644 index 0000000..0e18c2b --- /dev/null +++ b/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] diff --git a/obj/Debug/net6.0/ActiveProtect.AssemblyInfo.cs b/obj/Debug/net6.0/ActiveProtect.AssemblyInfo.cs new file mode 100644 index 0000000..f23d1cf --- /dev/null +++ b/obj/Debug/net6.0/ActiveProtect.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("ActiveProtect")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e14978c785bbbc984facc644a8d191edce24c75c")] +[assembly: System.Reflection.AssemblyProductAttribute("ActiveProtect")] +[assembly: System.Reflection.AssemblyTitleAttribute("ActiveProtect")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// 由 MSBuild WriteCodeFragment 类生成。 + diff --git a/obj/Debug/net6.0/ActiveProtect.AssemblyInfoInputs.cache b/obj/Debug/net6.0/ActiveProtect.AssemblyInfoInputs.cache new file mode 100644 index 0000000..97d351d --- /dev/null +++ b/obj/Debug/net6.0/ActiveProtect.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +d6e2f077e469fa47c1242ecde48fddf59a202b3ea36ab99595984219b25752f5 diff --git a/obj/Debug/net6.0/ActiveProtect.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/net6.0/ActiveProtect.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..12859fc --- /dev/null +++ b/obj/Debug/net6.0/ActiveProtect.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,13 @@ +is_global = true +build_property.TargetFramework = net6.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = ActiveProtect +build_property.ProjectDir = /Users/tianjianyong/apps/ActiveProtect/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = diff --git a/obj/Debug/net6.0/ActiveProtect.assets.cache b/obj/Debug/net6.0/ActiveProtect.assets.cache new file mode 100644 index 0000000..a07b9fa Binary files /dev/null and b/obj/Debug/net6.0/ActiveProtect.assets.cache differ diff --git a/obj/Debug/net6.0/ActiveProtect.csproj.CoreCompileInputs.cache b/obj/Debug/net6.0/ActiveProtect.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..63a2195 --- /dev/null +++ b/obj/Debug/net6.0/ActiveProtect.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +d599ebd2c33554dd309f6ac72929b62ad5bb06769660812e83f209fa4bb5a0fe diff --git a/obj/Debug/net6.0/ActiveProtect.csproj.FileListAbsolute.txt b/obj/Debug/net6.0/ActiveProtect.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e47b8f8 --- /dev/null +++ b/obj/Debug/net6.0/ActiveProtect.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +/Users/tianjianyong/apps/ActiveProtect/bin/Debug/net6.0/ActiveProtect +/Users/tianjianyong/apps/ActiveProtect/bin/Debug/net6.0/ActiveProtect.deps.json +/Users/tianjianyong/apps/ActiveProtect/bin/Debug/net6.0/ActiveProtect.runtimeconfig.json +/Users/tianjianyong/apps/ActiveProtect/bin/Debug/net6.0/ActiveProtect.dll +/Users/tianjianyong/apps/ActiveProtect/bin/Debug/net6.0/ActiveProtect.pdb +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/ActiveProtect.GeneratedMSBuildEditorConfig.editorconfig +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/ActiveProtect.AssemblyInfoInputs.cache +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/ActiveProtect.AssemblyInfo.cs +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/ActiveProtect.csproj.CoreCompileInputs.cache +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/ActiveProtect.dll +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/refint/ActiveProtect.dll +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/ActiveProtect.pdb +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/ActiveProtect.genruntimeconfig.cache +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/net6.0/ref/ActiveProtect.dll diff --git a/obj/Debug/net6.0/ActiveProtect.dll b/obj/Debug/net6.0/ActiveProtect.dll new file mode 100644 index 0000000..6ec90c2 Binary files /dev/null and b/obj/Debug/net6.0/ActiveProtect.dll differ diff --git a/obj/Debug/net6.0/ActiveProtect.genruntimeconfig.cache b/obj/Debug/net6.0/ActiveProtect.genruntimeconfig.cache new file mode 100644 index 0000000..a9dd355 --- /dev/null +++ b/obj/Debug/net6.0/ActiveProtect.genruntimeconfig.cache @@ -0,0 +1 @@ +404a820adea6677bf6611952c76ec29661acb00b5148a15f219d74c18797fd97 diff --git a/obj/Debug/net6.0/ActiveProtect.pdb b/obj/Debug/net6.0/ActiveProtect.pdb new file mode 100644 index 0000000..779b052 Binary files /dev/null and b/obj/Debug/net6.0/ActiveProtect.pdb differ diff --git a/obj/Debug/net6.0/apphost b/obj/Debug/net6.0/apphost new file mode 100755 index 0000000..139155c Binary files /dev/null and b/obj/Debug/net6.0/apphost differ diff --git a/obj/Debug/net6.0/ref/ActiveProtect.dll b/obj/Debug/net6.0/ref/ActiveProtect.dll new file mode 100644 index 0000000..b0ff3d6 Binary files /dev/null and b/obj/Debug/net6.0/ref/ActiveProtect.dll differ diff --git a/obj/Debug/net6.0/refint/ActiveProtect.dll b/obj/Debug/net6.0/refint/ActiveProtect.dll new file mode 100644 index 0000000..b0ff3d6 Binary files /dev/null and b/obj/Debug/net6.0/refint/ActiveProtect.dll differ diff --git a/obj/Debug/net8.0/ActiveProtect.AssemblyInfo.cs b/obj/Debug/net8.0/ActiveProtect.AssemblyInfo.cs index 47032cf..f23d1cf 100644 --- a/obj/Debug/net8.0/ActiveProtect.AssemblyInfo.cs +++ b/obj/Debug/net8.0/ActiveProtect.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("ActiveProtect")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f574c1be6bcbb73b38f2347680d3f4f4e2c241dd")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e14978c785bbbc984facc644a8d191edce24c75c")] [assembly: System.Reflection.AssemblyProductAttribute("ActiveProtect")] [assembly: System.Reflection.AssemblyTitleAttribute("ActiveProtect")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net8.0/ActiveProtect.AssemblyInfoInputs.cache b/obj/Debug/net8.0/ActiveProtect.AssemblyInfoInputs.cache index b2adcaf..97d351d 100644 --- a/obj/Debug/net8.0/ActiveProtect.AssemblyInfoInputs.cache +++ b/obj/Debug/net8.0/ActiveProtect.AssemblyInfoInputs.cache @@ -1 +1 @@ -26cdf876bff1ffe1787c12bced73fbbaf39d90b3e9182600d9597f4f5ccc12d8 +d6e2f077e469fa47c1242ecde48fddf59a202b3ea36ab99595984219b25752f5 diff --git a/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs b/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs new file mode 100644 index 0000000..669815a --- /dev/null +++ b/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] diff --git a/obj/Debug/netstandard2.1/ActiveProtect.AssemblyInfo.cs b/obj/Debug/netstandard2.1/ActiveProtect.AssemblyInfo.cs new file mode 100644 index 0000000..f23d1cf --- /dev/null +++ b/obj/Debug/netstandard2.1/ActiveProtect.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("ActiveProtect")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e14978c785bbbc984facc644a8d191edce24c75c")] +[assembly: System.Reflection.AssemblyProductAttribute("ActiveProtect")] +[assembly: System.Reflection.AssemblyTitleAttribute("ActiveProtect")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// 由 MSBuild WriteCodeFragment 类生成。 + diff --git a/obj/Debug/netstandard2.1/ActiveProtect.AssemblyInfoInputs.cache b/obj/Debug/netstandard2.1/ActiveProtect.AssemblyInfoInputs.cache new file mode 100644 index 0000000..97d351d --- /dev/null +++ b/obj/Debug/netstandard2.1/ActiveProtect.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +d6e2f077e469fa47c1242ecde48fddf59a202b3ea36ab99595984219b25752f5 diff --git a/obj/Debug/netstandard2.1/ActiveProtect.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/netstandard2.1/ActiveProtect.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..8649e4b --- /dev/null +++ b/obj/Debug/netstandard2.1/ActiveProtect.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,5 @@ +is_global = true +build_property.RootNamespace = ActiveProtect +build_property.ProjectDir = /Users/tianjianyong/apps/ActiveProtect/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = diff --git a/obj/Debug/netstandard2.1/ActiveProtect.GlobalUsings.g.cs b/obj/Debug/netstandard2.1/ActiveProtect.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/obj/Debug/netstandard2.1/ActiveProtect.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/obj/Debug/netstandard2.1/ActiveProtect.assets.cache b/obj/Debug/netstandard2.1/ActiveProtect.assets.cache new file mode 100644 index 0000000..518ef05 Binary files /dev/null and b/obj/Debug/netstandard2.1/ActiveProtect.assets.cache differ diff --git a/obj/Debug/netstandard2.1/ActiveProtect.csproj.CoreCompileInputs.cache b/obj/Debug/netstandard2.1/ActiveProtect.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..b284a68 --- /dev/null +++ b/obj/Debug/netstandard2.1/ActiveProtect.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +d1ea287e903154dc338b90307ca21673394cf3b7d4242612dd7b8e88b0421550 diff --git a/obj/Debug/netstandard2.1/ActiveProtect.csproj.FileListAbsolute.txt b/obj/Debug/netstandard2.1/ActiveProtect.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..185df00 --- /dev/null +++ b/obj/Debug/netstandard2.1/ActiveProtect.csproj.FileListAbsolute.txt @@ -0,0 +1,9 @@ +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/netstandard2.1/ActiveProtect.GeneratedMSBuildEditorConfig.editorconfig +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/netstandard2.1/ActiveProtect.AssemblyInfoInputs.cache +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/netstandard2.1/ActiveProtect.AssemblyInfo.cs +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/netstandard2.1/ActiveProtect.csproj.CoreCompileInputs.cache +/Users/tianjianyong/apps/ActiveProtect/bin/Debug/netstandard2.1/ActiveProtect.deps.json +/Users/tianjianyong/apps/ActiveProtect/bin/Debug/netstandard2.1/ActiveProtect.dll +/Users/tianjianyong/apps/ActiveProtect/bin/Debug/netstandard2.1/ActiveProtect.pdb +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/netstandard2.1/ActiveProtect.dll +/Users/tianjianyong/apps/ActiveProtect/obj/Debug/netstandard2.1/ActiveProtect.pdb diff --git a/obj/Debug/netstandard2.1/ActiveProtect.dll b/obj/Debug/netstandard2.1/ActiveProtect.dll new file mode 100644 index 0000000..0dfaa44 Binary files /dev/null and b/obj/Debug/netstandard2.1/ActiveProtect.dll differ diff --git a/obj/Debug/netstandard2.1/ActiveProtect.pdb b/obj/Debug/netstandard2.1/ActiveProtect.pdb new file mode 100644 index 0000000..f45ab76 Binary files /dev/null and b/obj/Debug/netstandard2.1/ActiveProtect.pdb differ diff --git a/obj/project.assets.json b/obj/project.assets.json index d92a3d5..ac1b25d 100644 --- a/obj/project.assets.json +++ b/obj/project.assets.json @@ -1,11 +1,11 @@ { "version": 3, "targets": { - "net8.0": {} + "net6.0": {} }, "libraries": {}, "projectFileDependencyGroups": { - "net8.0": [] + "net6.0": [] }, "packageFolders": { "/Users/tianjianyong/.nuget/packages/": {} @@ -23,14 +23,14 @@ "/Users/tianjianyong/.nuget/NuGet/NuGet.Config" ], "originalTargetFrameworks": [ - "net8.0" + "net6.0" ], "sources": { "https://api.nuget.org/v3/index.json": {} }, "frameworks": { - "net8.0": { - "targetAlias": "net8.0", + "net6.0": { + "targetAlias": "net6.0", "projectReferences": {} } }, @@ -46,8 +46,8 @@ } }, "frameworks": { - "net8.0": { - "targetAlias": "net8.0", + "net6.0": { + "targetAlias": "net6.0", "imports": [ "net461", "net462", @@ -59,12 +59,26 @@ ], "assetTargetFallback": true, "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[6.0.33, 6.0.33]" + }, + { + "name": "Microsoft.NETCore.App.Host.osx-arm64", + "version": "[6.0.33, 6.0.33]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[6.0.33, 6.0.33]" + } + ], "frameworkReferences": { "Microsoft.NETCore.App": { "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/8.0.402/PortableRuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/8.0.402/RuntimeIdentifierGraph.json" } } } diff --git a/obj/project.nuget.cache b/obj/project.nuget.cache index f04678d..d4ec3db 100644 --- a/obj/project.nuget.cache +++ b/obj/project.nuget.cache @@ -1,8 +1,12 @@ { "version": 2, - "dgSpecHash": "jBSl2ThGU2M=", + "dgSpecHash": "j5PpCU9trrQ=", "success": true, "projectFilePath": "/Users/tianjianyong/apps/ActiveProtect/ActiveProtect.csproj", - "expectedPackageFiles": [], + "expectedPackageFiles": [ + "/Users/tianjianyong/.nuget/packages/microsoft.netcore.app.ref/6.0.33/microsoft.netcore.app.ref.6.0.33.nupkg.sha512", + "/Users/tianjianyong/.nuget/packages/microsoft.aspnetcore.app.ref/6.0.33/microsoft.aspnetcore.app.ref.6.0.33.nupkg.sha512", + "/Users/tianjianyong/.nuget/packages/microsoft.netcore.app.host.osx-arm64/6.0.33/microsoft.netcore.app.host.osx-arm64.6.0.33.nupkg.sha512" + ], "logs": [] } \ No newline at end of file