Class CVar
- java.lang.Object
-
- com.bombinggames.wurfelengine.core.cvar.CVar
-
- Direct Known Subclasses:
BooleanCVar
,FloatCVar
,IntCVar
,StringCVar
public abstract class CVar extends java.lang.Object
CVars start with a small letter and are CamelCase.- Since:
- v1.4.2
-
-
Field Summary
Fields Modifier and Type Field Description protected CVarFlags
flags
protected java.lang.String
name
protected AbstractCVarSystem
parent
-
Constructor Summary
Constructors Constructor Description CVar()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Object
getDefaultValue()
java.lang.String
getName()
abstract java.lang.Object
getValue()
protected void
register(java.lang.String name, CVarFlags flag, AbstractCVarSystem parent)
Registering should only be done by the game or the engine in init phase.abstract void
setDefaultValue(java.lang.Object value)
The value which is used for initializiation.abstract void
setValue(java.lang.Object value)
abstract java.lang.String
toString()
The values as string representation.
-
-
-
Field Detail
-
parent
protected AbstractCVarSystem parent
-
flags
protected CVarFlags flags
-
name
protected java.lang.String name
-
-
Method Detail
-
getValue
public abstract java.lang.Object getValue()
- Returns:
-
setValue
public abstract void setValue(java.lang.Object value)
- Parameters:
value
-- See Also:
setDefaultValue(java.lang.Object)
-
getDefaultValue
public abstract java.lang.Object getDefaultValue()
- Returns:
-
setDefaultValue
public abstract void setDefaultValue(java.lang.Object value)
The value which is used for initializiation.- Parameters:
value
-
-
getName
public java.lang.String getName()
- Returns:
-
toString
public abstract java.lang.String toString()
The values as string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
-
register
protected void register(java.lang.String name, CVarFlags flag, AbstractCVarSystem parent)
Registering should only be done by the game or the engine in init phase.- Parameters:
name
- name of the cvarflag
-parent
- the system where this cvar is registered- Since:
- v1.4.2
-
-