void DrawWaypointsFollower(Rect rect) { if (thisSystemIsReady) { IWaypointsFollower follower = waypointsFollowerAdaptor.GetWaypointsFollower(); int currentCurveIndex = follower.GetCurrentWaypointCurveIndex(); float normalizedPosInCurve = follower.GetNormalizedPositionInCurve(); GUI.Label( rect, "curveID: " + currentCurveIndex.ToString() + ", " + "normPos: " + normalizedPosInCurve.ToString() ); } }
void DrawWaypointEvents(Rect rect) { if (thisGameIsReady) { string result = ""; IWaypointsFollower follower = waypointsFollowerAdaptor.GetWaypointsFollower(); float normalizedPosOnCurve = follower.GetNormalizedPositionInCurve(); result += "normPos: " + normalizedPosOnCurve.ToString("N2") + "\n"; IWaypointCurveCycleManager curveManager = curveCycleManagerAdaptor.GetWaypointsManager(); int currentCurveIndex = gameManager.GetCurrentWaypointGroupIndex(); IWaypointCurve currentCurve = curveManager.GetAllWaypointCurves()[currentCurveIndex]; IWaypointEvent[] evnets = currentCurve.GetWaypointEvents(); result += "curve id: " + currentCurve.GetIndex().ToString() + "\n"; // foreach(IWaypointEvent wpEvent in evnets){ // string thisEventString = "\n"; // thisEventString += wpEvent.GetName() + ": " + wpEvent.GetEventPoint().ToString("N2"); // TargetType thisType = TargetType.Flyer; // bool isRare = false; // if(wpEvent is IShootingTargetSpawnWaypointEvent){ // IShootingTargetSpawnWaypointEvent spawnEvent = (IShootingTargetSpawnWaypointEvent)wpEvent; // isRare = spawnEvent.IsRare(); // thisType = spawnEvent.GetTargetType(); // IShootingTargetSpawnPoint spawnPoint = spawnEvent.GetSpawnPoint(); // thisEventString += ", sp: " + spawnPoint.GetName(); // IShootingTarget target = spawnPoint.GetSpawnedTarget(); // if(target != null) // thisEventString += ", tar: " + target.GetName(); // else // thisEventString += ", tar: null"; // } // Color col = GetStringColorForType(thisType, isRare); // thisEventString = DKUtility.DebugHelper.StringInColor(thisEventString, col); // result += thisEventString; // string executedString = ", "; // if(!wpEvent.IsExecuted()) // executedString += "pending"; // else // executedString += DKUtility.DebugHelper.RedString("executed"); // result += executedString; // } GUI.Label( rect, result ); } }