|
|
@ -1,9 +1,11 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using CriticalPathAnalyzer.Shared.Packets.C2S;
|
|
|
|
using CriticalPathAnalyzer.Shared.Packets.C2S;
|
|
|
|
using CriticalPathAnalyzer.Shared.Packets.S2C;
|
|
|
|
using CriticalPathAnalyzer.Shared.Packets.S2C;
|
|
|
|
|
|
|
|
using JimmysUnityUtilities;
|
|
|
|
using LogicAPI.Data;
|
|
|
|
using LogicAPI.Data;
|
|
|
|
using LogicLog;
|
|
|
|
using LogicLog;
|
|
|
|
using LogicWorld.Interfaces;
|
|
|
|
using LogicWorld.Interfaces;
|
|
|
|
|
|
|
|
using LogicWorld.Outlines;
|
|
|
|
using LogicWorld.Physics;
|
|
|
|
using LogicWorld.Physics;
|
|
|
|
using LogicWorld.Players;
|
|
|
|
using LogicWorld.Players;
|
|
|
|
|
|
|
|
|
|
|
@ -19,14 +21,19 @@ namespace CriticalPathAnalyzer.Client.Tool {
|
|
|
|
private static Guid _currentRequestGuid = Guid.NewGuid();
|
|
|
|
private static Guid _currentRequestGuid = Guid.NewGuid();
|
|
|
|
private static AnalyzePathResponse _response;
|
|
|
|
private static AnalyzePathResponse _response;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static readonly OutlineData StartOutline = new OutlineData(new Color24(0x00ff00));
|
|
|
|
|
|
|
|
private static readonly OutlineData EndOutline = new OutlineData(new Color24(0xff0000));
|
|
|
|
|
|
|
|
|
|
|
|
public static void Init(ILogicLogger logger) {
|
|
|
|
public static void Init(ILogicLogger logger) {
|
|
|
|
_logger = logger;
|
|
|
|
_logger = logger;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void Clear() {
|
|
|
|
public static void Clear() {
|
|
|
|
|
|
|
|
PathHighLighter.RemoveHighLighting();
|
|
|
|
|
|
|
|
Outliner.RemoveOutline(_startPegAddress);
|
|
|
|
|
|
|
|
Outliner.RemoveOutline(_endPegAddress);
|
|
|
|
_startPegAddress = PegAddress.Empty;
|
|
|
|
_startPegAddress = PegAddress.Empty;
|
|
|
|
_endPegAddress = PegAddress.Empty;
|
|
|
|
_endPegAddress = PegAddress.Empty;
|
|
|
|
PathHighLighter.RemoveHighLighting();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static PegAddress RayCastPeg() {
|
|
|
|
private static PegAddress RayCastPeg() {
|
|
|
@ -57,6 +64,8 @@ namespace CriticalPathAnalyzer.Client.Tool {
|
|
|
|
_logger.Info("Analyze Path Start");
|
|
|
|
_logger.Info("Analyze Path Start");
|
|
|
|
PegAddress pegAddress = RayCastPeg();
|
|
|
|
PegAddress pegAddress = RayCastPeg();
|
|
|
|
if (!pegAddress.IsEmpty()) {
|
|
|
|
if (!pegAddress.IsEmpty()) {
|
|
|
|
|
|
|
|
Outliner.RemoveOutline(_startPegAddress);
|
|
|
|
|
|
|
|
Outliner.Outline(pegAddress, StartOutline);
|
|
|
|
_startPegAddress = pegAddress;
|
|
|
|
_startPegAddress = pegAddress;
|
|
|
|
if (!_startPegAddress.IsEmpty() && !_endPegAddress.IsEmpty()) {
|
|
|
|
if (!_startPegAddress.IsEmpty() && !_endPegAddress.IsEmpty()) {
|
|
|
|
CalculateCriticalPath();
|
|
|
|
CalculateCriticalPath();
|
|
|
@ -68,6 +77,8 @@ namespace CriticalPathAnalyzer.Client.Tool {
|
|
|
|
_logger.Info("Analyze Path End");
|
|
|
|
_logger.Info("Analyze Path End");
|
|
|
|
PegAddress pegAddress = RayCastPeg();
|
|
|
|
PegAddress pegAddress = RayCastPeg();
|
|
|
|
if (!pegAddress.IsEmpty()) {
|
|
|
|
if (!pegAddress.IsEmpty()) {
|
|
|
|
|
|
|
|
Outliner.RemoveOutline(_endPegAddress);
|
|
|
|
|
|
|
|
Outliner.Outline(pegAddress, EndOutline);
|
|
|
|
_endPegAddress = pegAddress;
|
|
|
|
_endPegAddress = pegAddress;
|
|
|
|
if (!_startPegAddress.IsEmpty() && !_endPegAddress.IsEmpty()) {
|
|
|
|
if (!_startPegAddress.IsEmpty() && !_endPegAddress.IsEmpty()) {
|
|
|
|
CalculateCriticalPath();
|
|
|
|
CalculateCriticalPath();
|
|
|
|