![]() |
SpaceRTS - Starter Pack
1.3
|
Component class that does all the magic to store, index and return the important components from child GameObjects. More...
Classes | |
class | ProxyData |
Contains all the data for each property More... | |
Public Member Functions | |
int | AddEmptyElement () |
Adds a new item at the end of the list with empty data in it. More... | |
void | SetPropertyData (string propName, Component comp) |
Changes the Component reference for the requested property. if the name of the property doesn't exist then we add it. More... | |
void | SetPropertyData (string propName, GameObject go) |
Changes the GameObject Reference for the requested property. also sets null in the component reference data. If the name of the property doesn't exist then we add it. More... | |
void | ChangePropertyName (int index, string newName) |
Changes the name of the property at the requested index. More... | |
void | RemoveAt (int index) |
Remove a property by index position. More... | |
void | Remove (string propName) |
Remove a property by it name. More... | |
void | ElementAt (int index, out ProxyData dataOut) |
Returns the property data located at index . More... | |
bool | HasProperty (string propName) |
Returns true if there is a property registered with the name propName . More... | |
T | GetPropertyValue< T > (string propName) |
Return an already casted component registered by the propName More... | |
IEnumerable< T > | GetAllPropertyValues< T > (string startsWith) |
Similar to GetPropertyValue() but returns a IEnumerable of type T of all properties that match the start of its name with startsWith and are casteable to T type. More... | |
Component | GetPropertyValue (string propName) |
Returns a component registered by the propName More... | |
GameObject | GetPropertyGameObject (string propName) |
Returns the GameObject that belongs to the property propName . More... | |
T | GetPropertyValueAt< T > (int index) |
Return an already casted component at the index position. More... | |
GameObject | GetPropertyGameObjectAt (int index) |
Returns the GameObject that belongs to the property index . More... | |
void | OnBeforeSerialize () |
Implementation of the method in ISerializationCallbackReceiver. We don't need to do anything here but we can't remove this method. More... | |
void | OnAfterDeserialize () |
Implementation of the method in ISerializationCallbackReceiver that allows us to rebuild the property names dictionary after scripts reloading. More... | |
Properties | |
int | ElementsCount [get] |
Returns the quantity of registered elements. More... | |
Component class that does all the magic to store, index and return the important components from child GameObjects.
int GameBase.ComponentProxy.AddEmptyElement | ( | ) |
Adds a new item at the end of the list with empty data in it.
void GameBase.ComponentProxy.ChangePropertyName | ( | int | index, |
string | newName | ||
) |
Changes the name of the property at the requested index.
index | Index of the property to change |
newName | The new name of the property |
void GameBase.ComponentProxy.ElementAt | ( | int | index, |
out ProxyData | dataOut | ||
) |
Returns the property data located at index .
index | Index of the property to return its data. |
dataOut | Data structure that will be filled with the property requested. |
IEnumerable<T> GameBase.ComponentProxy.GetAllPropertyValues< T > | ( | string | startsWith | ) |
Similar to GetPropertyValue() but returns a IEnumerable of type T of all properties that match the start of its name with startsWith and are casteable to T type.
T |
startsWith |
T | : | Component |
GameObject GameBase.ComponentProxy.GetPropertyGameObject | ( | string | propName | ) |
Returns the GameObject that belongs to the property propName .
propName | Name of the property to find. |
GameObject GameBase.ComponentProxy.GetPropertyGameObjectAt | ( | int | index | ) |
Returns the GameObject that belongs to the property index .
index | index of the property to find. |
Component GameBase.ComponentProxy.GetPropertyValue | ( | string | propName | ) |
Returns a component registered by the propName
propName | Name of requested property. |
T GameBase.ComponentProxy.GetPropertyValue< T > | ( | string | propName | ) |
Return an already casted component registered by the propName
T | Object type to return. T must inherit from Component. |
propName | Name of requested property. |
T | : | Component |
T GameBase.ComponentProxy.GetPropertyValueAt< T > | ( | int | index | ) |
Return an already casted component at the index position.
T | Object type to return. T must inherit from Component. |
index | Index position of requested property. |
T | : | Component |
bool GameBase.ComponentProxy.HasProperty | ( | string | propName | ) |
Returns true if there is a property registered with the name propName .
propName |
void GameBase.ComponentProxy.OnAfterDeserialize | ( | ) |
Implementation of the method in ISerializationCallbackReceiver that allows us to rebuild the property names dictionary after scripts reloading.
void GameBase.ComponentProxy.OnBeforeSerialize | ( | ) |
Implementation of the method in ISerializationCallbackReceiver. We don't need to do anything here but we can't remove this method.
void GameBase.ComponentProxy.Remove | ( | string | propName | ) |
Remove a property by it name.
propName | Name of the property to remove. |
void GameBase.ComponentProxy.RemoveAt | ( | int | index | ) |
Remove a property by index position.
index | The index position of the property to remove. |
void GameBase.ComponentProxy.SetPropertyData | ( | string | propName, |
Component | comp | ||
) |
Changes the Component reference for the requested property. if the name of the property doesn't exist then we add it.
propName | Name of the property to change |
comp | Component reference to setup |
void GameBase.ComponentProxy.SetPropertyData | ( | string | propName, |
GameObject | go | ||
) |
Changes the GameObject Reference for the requested property. also sets null in the component reference data. If the name of the property doesn't exist then we add it.
propName | Name of the property to change |
go | GameObject reference to setup |
|
get |
Returns the quantity of registered elements.