C# Class ObjectPlacer, A-Study-in-Composition

Mostrar archivo Open project: mortennobel/A-Study-in-Composition Class Usage Examples

Public Properties

Property Type Description
bounds Bounds
generator LSystem
groundColor Color
horizonColor Color
leavesVariation Variation
lightColor Color
paletteSaturation float
paletteValue float
placementSeed int
prefab GameObject
skyColor Color
skybox Material
starField StarField
starsColor Color
sunLight Light

Public Methods

Method Description
AddVariationColors ( List colors, Rand rand ) : void
Place ( ) : void
PlaceObject ( GameObject prefab, Vector3 pos, int x, int z, float spacing ) : void
Randomize ( bool newTheme = true ) : void
Randomize ( int seed, bool newTheme = true ) : void
RandomizeColors ( Rand hash, bool newTheme = true ) : void
RandomizePlacement ( Rand hash, bool newTheme = true ) : void
RandomizeTrees ( Rand hash, bool newTheme = true ) : void
UpdateGlobals ( ) : void

Private Methods

Method Description
CalculateColor ( List colors, Color reference, HSVModifier modifier ) : Color
Clamp ( Vector2 value, float min, float max ) : Vector2
FullToPositiveRange ( float full ) : float
GetColor ( Variation, variation, float t ) : Color
GetPrimaryColors ( Color baseColor, Rand hash ) : List
LerpColorInHSV ( Color a, Color b, float t ) : Color
PickBestColor ( List colors, Color reference ) : Color
RandomVariation ( Rand hash, Vector2 reference, float fraction ) : Vector2
RandomVariation ( Rand hash, float reference, float fraction ) : float
WrapHueAround ( Vector4 colorToModify, Vector4 colorToCompareWith ) : Color

Method Details

AddVariationColors() public method

public AddVariationColors ( List colors, Rand rand ) : void
colors List
rand Rand
return void

Place() public method

public Place ( ) : void
return void

PlaceObject() public method

public PlaceObject ( GameObject prefab, Vector3 pos, int x, int z, float spacing ) : void
prefab GameObject
pos Vector3
x int
z int
spacing float
return void

Randomize() public method

public Randomize ( bool newTheme = true ) : void
newTheme bool
return void

Randomize() public method

public Randomize ( int seed, bool newTheme = true ) : void
seed int
newTheme bool
return void

RandomizeColors() public method

public RandomizeColors ( Rand hash, bool newTheme = true ) : void
hash Rand
newTheme bool
return void

RandomizePlacement() public method

public RandomizePlacement ( Rand hash, bool newTheme = true ) : void
hash Rand
newTheme bool
return void

RandomizeTrees() public method

public RandomizeTrees ( Rand hash, bool newTheme = true ) : void
hash Rand
newTheme bool
return void

UpdateGlobals() public method

public UpdateGlobals ( ) : void
return void

Property Details

bounds public_oe property

public Bounds bounds
return Bounds

generator public_oe property

public LSystem generator
return LSystem

groundColor public_oe property

public Color groundColor
return Color

horizonColor public_oe property

public Color horizonColor
return Color

leavesVariation public_oe property

public Variation leavesVariation
return Variation

lightColor public_oe property

public Color lightColor
return Color

paletteSaturation public_oe property

public float paletteSaturation
return float

paletteValue public_oe property

public float paletteValue
return float

placementSeed public_oe property

public int placementSeed
return int

prefab public_oe property

public GameObject prefab
return GameObject

skyColor public_oe property

public Color skyColor
return Color

skybox public_oe property

public Material skybox
return Material

starField public_oe property

public StarField starField
return StarField

starsColor public_oe property

public Color starsColor
return Color

sunLight public_oe property

public Light sunLight
return Light