C# Class Buildings, City-Generator

Afficher le fichier Open project: cybercritic/City-Generator Class Usage Examples

Méthodes publiques

Свойство Type Description
BuildingStatic GameObject,
Instances GameObject,
Roads GameObject,
Splitting bool

Private Properties

Свойство Type Description
AddBuildingMesh void
CheckValidPlacement bool
GetQuad void
GetRotation float
IntersectsRoad bool
RotateAroundPoint Vector3
Start void
Update void
checkSegment void

Méthodes publiques

Méthode Description
Clear ( ) : void

clears all buildings and their objects

PopulateClick ( ) : void

Flips the building generation on

Private Methods

Méthode Description
AddBuildingMesh ( Building, building ) : void

Adds a building mesh

CheckValidPlacement ( Building, building ) : bool

check if new building placement is ok

GetQuad ( Vector3 vertices, int &last, int &triangles, Vector3 &normals, Vector2 &uvs ) : void

construct a building quad given 4 points and last indice

GetRotation ( Vector3 segDir ) : float

get 360 rotation of vector

IntersectsRoad ( Building, building ) : bool

check if a given building intersecs a road

RotateAroundPoint ( Vector3 point, Vector3 pivot, Quaternion, angle ) : Vector3
Start ( ) : void
Update ( ) : void
checkSegment ( RoadSegment, segment ) : void

evaluate segment for potential building placement

Method Details

Clear() public méthode

clears all buildings and their objects
public Clear ( ) : void
Résultat void

PopulateClick() public méthode

Flips the building generation on
public PopulateClick ( ) : void
Résultat void

Property Details

BuildingStatic public_oe property

public GameObject, BuildingStatic
Résultat GameObject,

Instances public_oe property

public GameObject, Instances
Résultat GameObject,

Roads public_oe property

public GameObject, Roads
Résultat GameObject,

Splitting public_oe static_oe property

public static bool Splitting
Résultat bool