コード例 #1
0
 public PathStatistics(TeleportNode point)
 {
     cost = 0;
     efficiency = 0;
     flyTime = 0;
     path = new List<TeleportNode>();
     path.Add(point);
     rideTime = 0;
     teleportTime = 0;
     walkTime = 0;
 }
コード例 #2
0
ファイル: TeleportEditor.cs プロジェクト: Finb/MMX
    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();
    }
コード例 #3
0
 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;
 }