Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Expansions.Missions.Editor.GAPCelestialBodyState_Biomes Class Reference

State machine for Celestial Body in the GAP when displaying Biomes. More...

Inheritance diagram for Expansions.Missions.Editor.GAPCelestialBodyState_Biomes:
Expansions.Missions.Editor.GAPCelestialBodyState_Base

Public Member Functions

override void End ()
 Ends the State, nothing to cleanup for now More...
 
bool HasSelectedBiome ()
 Return if player has selected a biome in gap More...
 
override void Init (GAPCelestialBody gapRef)
 Intializes the variables for this state, gets a reference to the biomes shader to be used later More...
 
override void LoadPlanet (CelestialBody newCelestialBody)
 When a planet is loaded, it will replace the scaled planet shader for the biomes shader More...
 
delegate void OnBiomeSelected (CBAttributeMapSO.MapAttribute biome)
 
override void OnClickUp (RaycastHit?hit)
 When the gap is clicked, it will test if the user hit the planets sphere to determine Longitude/Latitude, after that it wil look which biome does it belong to and set the shader colors appropriately It will also clear the Hovered biome values and color More...
 
override void OnMouseOver (Vector2 cameraPoint)
 When the mouse is hovering the GAP, it will update the biome hover values and highlight it in the shader with a different color. More...
 
void SelectBiome (CBAttributeMapSO.MapAttribute newBiome)
 Highlights a biome in the GAP, hides the hovered biome color and updates the text to display what was selected More...
 
void SelectBiomeByName (string biomeName)
 Given the name of the biome it will search it in the celestial body and highlight it, does nothing if its not found or has no biomes More...
 
override void UnloadPlanet ()
 When a planet is unloaded, it will set back the defaul shader to the scaled planet More...
 
override void Update ()
 Updates the State every frame More...
 
- Public Member Functions inherited from Expansions.Missions.Editor.GAPCelestialBodyState_Base
GAPOrbitRenderer CreateSimpleOrbit (AdditionalEntity entityType, string name, Orbit orbit, MapNode.TypeData typeData)
 
void CreateSurfaceAreaGizmo (double latitude, double longitude, double radius)
 
GAPSurfaceIcon CreateSurfaceIcon (AdditionalEntity entityType, string name, MapNode.TypeData typeData, double latitude, double longitude, double altitude)
 
virtual void LateUpdate ()
 Updates the state, its called each frame More...
 
virtual void OnClick (RaycastHit?hit)
 Called when the GAP gets clicked More...
 
virtual void OnDrag (PointerEventData.InputButton arg0, Vector2 arg1)
 Called when the mouse is rightclick holding and dragging in the GAP window More...
 
virtual void OnDragEnd (RaycastHit?hit)
 Called when mouse button is released after dragging More...
 
void OnFilterButton (AdditionalEntity entityType)
 UI Button events More...
 
void SetFilter (AdditionalEntity entityType, bool displayIcons)
 Icon toggles More...
 

Static Public Member Functions

static int GetBiomeIndex (CelestialBody body, string biomeName)
 Retunrns the index position of the biome in the array of the celestial body. More...
 

Public Attributes

OnBiomeSelected OnGAPBiomeSelected
 

Additional Inherited Members

- Public Types inherited from Expansions.Missions.Editor.GAPCelestialBodyState_Base
enum  AdditionalEntity {
  AdditionalEntity.Kerbal, AdditionalEntity.Asteroid, AdditionalEntity.Vessel, AdditionalEntity.Flag,
  AdditionalEntity.LaunchSite, AdditionalEntity.Objective
}
 
- Protected Attributes inherited from Expansions.Missions.Editor.GAPCelestialBodyState_Base
AdditionalEntity[] entityTypes
 
GAPCelestialBody gapRef
 

Detailed Description

State machine for Celestial Body in the GAP when displaying Biomes.

Member Function Documentation

override void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.End ( )
inlinevirtual

Ends the State, nothing to cleanup for now

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

static int Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.GetBiomeIndex ( CelestialBody  body,
string  biomeName 
)
inlinestatic

Retunrns the index position of the biome in the array of the celestial body.

Parameters
biomeNameThe name of the biome to be serched in the array
Returns
The index in the array
bool Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.HasSelectedBiome ( )
inline

Return if player has selected a biome in gap

Returns
override void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.Init ( GAPCelestialBody  gapRef)
inlinevirtual

Intializes the variables for this state, gets a reference to the biomes shader to be used later

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

override void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.LoadPlanet ( CelestialBody  newCelestialBody)
inlinevirtual

When a planet is loaded, it will replace the scaled planet shader for the biomes shader

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

delegate void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.OnBiomeSelected ( CBAttributeMapSO.MapAttribute  biome)
override void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.OnClickUp ( RaycastHit?  hit)
inlinevirtual

When the gap is clicked, it will test if the user hit the planets sphere to determine Longitude/Latitude, after that it wil look which biome does it belong to and set the shader colors appropriately It will also clear the Hovered biome values and color

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

override void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.OnMouseOver ( Vector2  cameraPoint)
inlinevirtual

When the mouse is hovering the GAP, it will update the biome hover values and highlight it in the shader with a different color.

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.SelectBiome ( CBAttributeMapSO.MapAttribute  newBiome)
inline

Highlights a biome in the GAP, hides the hovered biome color and updates the text to display what was selected

Parameters
newBiomeThe biome to be highlighted
void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.SelectBiomeByName ( string  biomeName)
inline

Given the name of the biome it will search it in the celestial body and highlight it, does nothing if its not found or has no biomes

Parameters
biomeNameThe name of the biome to be highlighted
override void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.UnloadPlanet ( )
inlinevirtual

When a planet is unloaded, it will set back the defaul shader to the scaled planet

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

override void Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.Update ( )
inlinevirtual

Updates the State every frame

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

Member Data Documentation

OnBiomeSelected Expansions.Missions.Editor.GAPCelestialBodyState_Biomes.OnGAPBiomeSelected

The documentation for this class was generated from the following file: