public PathStatistics(TeleportNode point) { cost = 0; efficiency = 0; flyTime = 0; path = new List<TeleportNode>(); path.Add(point); rideTime = 0; teleportTime = 0; walkTime = 0; }
public override void OnBodyGUI() { serializedObject.Update(); EditorGUIUtility.labelWidth = 100; TeleportNode node = target as TeleportNode; NodeEditorGUILayout.PortField(target.GetInputPort("input")); NodeEditorGUILayout.PropertyField(serializedObject.FindProperty("mapName")); NodeEditorGUILayout.PropertyField(serializedObject.FindProperty("roomName")); if (node.teleportPosition == Vector2.zero) { NodeEditorGUILayout.PropertyField(serializedObject.FindProperty("teleporterName")); } if (node.teleporterName == null || node.teleporterName.Length <= 0) { NodeEditorGUILayout.PropertyField(serializedObject.FindProperty("teleportPosition")); } NodeEditorGUILayout.PropertyField(serializedObject.FindProperty("soundEffect")); serializedObject.ApplyModifiedProperties(); }
private void DrawConnectedPaths(Pen pen, TeleportNode point) { foreach (ushort connectedPointID in point.Costs.Keys) { DrawPath(point.ID, connectedPointID); DrawPoint(connectedPointID); } }
public TeleportNodeDistance(float distance, TeleportNode point) { this.distance = distance; this.point = point; }