public NetworkNodeAsset(NetworkAsset network, CollectionAsset collection) : base(collection) { x = y = z = 0.0f; connections = new ConnectionAsset[0]; enabled = true; this.network = network; }
public NetworkAsset(string name, CollectionAsset collection) : base(collection) { this.name = name; x = y = z = 0; sX = sY = sZ = 10.0f; enabled = true; }
public WaypointAsset( string name, Vector3 position, float radius, NetworkAsset network, CollectionAsset collection ) : base( network, collection ) { this.Name = name; this.Position = position; this.radius = radius; disableRuntime = true; }
public NetworkNodeAsset( NetworkAsset network, CollectionAsset collection ) : base( collection ) { x = y = z = 0.0f; connections = new ConnectionAsset[ 0 ]; enabled = true; this.network = network; }
public NetworkAsset( string name, CollectionAsset collection ) : base( collection ) { this.name = name; x = y = z = 0; sX = sY = sZ = 10.0f; enabled = true; }
public ConnectionAsset( NetworkNodeAsset from, NetworkNodeAsset to, float width, CollectionAsset collection ) : base( collection ) { this.from = from; this.to = to; this.width = width; this.enabled = true; this.weightFactor = 1.0f; }
public bool LoadCollection(IPathAsset asset) { CollectionAsset collection; if (asset == null) { return(false); } collection = CollectionAsset.LoadFromData(asset.Data, asset); foreach (NetworkAsset network in collection.Networks) { networks.Add(network); } Debug.Log("AngryAnt " + Resources.Version + " - loaded collection. Network count now up to " + networks.Count + "."); return(true); }
//private Edge[] border; public CellAsset( string name, Vector3 position, TriangleAsset[] triangles, NetworkAsset network, CollectionAsset collection ) : base( network, collection ) { this.Name = name; this.Position = position; foreach( TriangleAsset triangle in triangles ) { triangle.Cell = this; } this.triangles = triangles; // TODO: Calculate border and position from triangles /*ArrayList edges, uses; Edge edge, existingEdge; edges = new ArrayList(); uses = new ArrayList(); foreach( TriangleAsset triangle in triangles ) { for( int i = 0; i < 3; i++ ) { edge = ( i == 0 ) ? new Edge( triangle.Points[ 0 ], triangles.Points[ 1 ] ) : ( i == 1 ) ? new Edge( triangle.Points[ 1 ], triangles.Points[ 2 ] ) : new Edge( triangle.Points[ 2 ], triangles.Points[ 0 ] ); for( int j = 0; j < edges.Count; j++ ) { existingEdge = edges[ j ]; if( edge.Equals( existingEdge ) ) { uses[ edges.IndexOf( existingEdge ) ]++; } } } }*/ }
public void LoadCollection( IPathAsset asset ) { Asset = asset; Collection = CollectionAsset.LoadFromData( Asset.Data, Asset ); }
public TaggedAsset(CollectionAsset collection) { this.collection = collection; tags = new int[0]; }
public void SaveCollection(CollectionAsset collectionAsset, IPathAsset pathAsset) { editorWindow.SaveCollection(collectionAsset, pathAsset); }
public WaypointAsset(string name, Vector3 position, float radius, NetworkAsset network, CollectionAsset collection) : base(network, collection) { this.Name = name; this.Position = position; this.radius = radius; disableRuntime = true; }
public GridNetworkAsset(string name, CollectionAsset collection) : base(name, collection) { nodes = new GridNodeAsset[0]; }
public WaypointNetworkAsset( string name, CollectionAsset collection ) : base( name, collection ) { waypoints = new WaypointAsset[ 0 ]; }
public WaypointNetworkAsset(string name, CollectionAsset collection) : base(name, collection) { waypoints = new WaypointAsset[0]; }
public void SaveCollection( CollectionAsset collectionAsset, IPathAsset pathAsset ) { editorWindow.SaveCollection( collectionAsset, pathAsset ); }
//private Edge[] border; public CellAsset(string name, Vector3 position, TriangleAsset[] triangles, NetworkAsset network, CollectionAsset collection) : base(network, collection) { this.Name = name; this.Position = position; foreach (TriangleAsset triangle in triangles) { triangle.Cell = this; } this.triangles = triangles; // TODO: Calculate border and position from triangles /*ArrayList edges, uses; * Edge edge, existingEdge; * * edges = new ArrayList(); * uses = new ArrayList(); * * foreach( TriangleAsset triangle in triangles ) * { * for( int i = 0; i < 3; i++ ) * { * edge = ( i == 0 ) ? new Edge( triangle.Points[ 0 ], triangles.Points[ 1 ] ) : * ( i == 1 ) ? new Edge( triangle.Points[ 1 ], triangles.Points[ 2 ] ) : * new Edge( triangle.Points[ 2 ], triangles.Points[ 0 ] ); * * for( int j = 0; j < edges.Count; j++ ) * { * existingEdge = edges[ j ]; * * if( edge.Equals( existingEdge ) ) * { * uses[ edges.IndexOf( existingEdge ) ]++; * } * } * } * }*/ }
public ConnectionAsset(NetworkNodeAsset from, NetworkNodeAsset to, float width, CollectionAsset collection) : base(collection) { this.from = from; this.to = to; this.width = width; this.enabled = true; this.weightFactor = 1.0f; }
public GridNodeAsset( string name, GridNetworkAsset network, CollectionAsset collection ) : base( network, collection ) { this.Name = name; }
public void LoadCollection(IPathAsset asset) { Asset = asset; Collection = CollectionAsset.LoadFromData(Asset.Data, Asset); }
public WaypointNetworkAsset( string name, CollectionAsset collection ) : base(name, collection) { Clear(); }
public void SaveCollection( CollectionAsset collectionAsset, IPathAsset pathAsset ) { pathAsset.Data = collectionAsset.GetData(); EditorUtility.SetDirty( ( PathAsset )pathAsset ); }
public NavmeshAsset(string name, CollectionAsset collection) : base(name, collection) { cells = new CellAsset[0]; }
public GridNodeAsset(string name, GridNetworkAsset network, CollectionAsset collection) : base(network, collection) { this.Name = name; }
public GridNetworkAsset( string name, CollectionAsset collection ) : base( name, collection ) { nodes = new GridNodeAsset[ 0 ]; }
public TaggedAsset( CollectionAsset collection ) { this.collection = collection; tags = new int[ 0 ]; }
public NavmeshAsset( string name, CollectionAsset collection ) : base( name, collection ) { cells = new CellAsset[ 0 ]; }