27 Debug.
Log(
"" +
this +
" not valid!");
85 data.SetInteractionMask(
operator);
88 data.m_BoolLast =
data.m_BoolCurrent;
90 if (
data.m_BoolTarget !=
data.m_BoolCurrent ||
data.IsSettingDefaultValues())
92 data.SetSettingDefaultValues(
false);
93 data.SetDataActive(
true);
107 data.m_BoolLast =
data.m_BoolCurrent;
108 if (!
data.IsSettingDefaultValues())
110 data.SetSettingDefaultValues(
true);
124 data.SetInteractionMask(
operator);
128 if (
data.m_IntTarget !=
data.m_IntCurrent ||
data.IsSettingDefaultValues())
130 data.SetSettingDefaultValues(
false);
131 data.SetDataActive(
true);
146 if (!
data.IsSettingDefaultValues())
148 data.SetSettingDefaultValues(
true);
162 data.SetInteractionMask(
operator);
164 data.m_FloatFormerTarget =
data.m_FloatTarget;
166 data.m_FloatLast =
data.m_FloatCurrent;
167 data.m_FloatStart =
data.m_FloatCurrent;
168 if (
data.m_FloatTarget !=
data.m_FloatCurrent ||
data.IsSettingDefaultValues())
170 data.SetSettingDefaultValues(
false);
171 data.SetDataActive(
true);
185 data.m_FloatFormerTarget =
data.m_FloatTarget;
186 data.m_FloatLast =
data.m_FloatCurrent;
187 data.m_FloatStart =
data.m_FloatCurrent;
188 if (!
data.IsSettingDefaultValues())
190 data.SetSettingDefaultValues(
true);
204 data.SetInteractionMask(
operator);
205 data.m_ColorFormerTarget =
data.m_ColorTarget;
209 data.m_ColorLast =
data.m_ColorCurrent;
210 data.m_ColorStart =
data.m_ColorCurrent;
213 data.SetSettingDefaultValues(
false);
214 data.SetDataActive(
true);
228 data.m_ColorFormerTarget =
data.m_ColorTarget;
229 data.m_ColorLast =
data.m_ColorCurrent;
230 data.m_ColorStart =
data.m_ColorCurrent;
231 if (!
data.IsSettingDefaultValues())
233 data.SetSettingDefaultValues(
true);
283 Error(
"GetRequestData | no data found in the structure");
285 data.m_Requester =
this;
PPOperators
PP operators, specify operation between subsequent layers.
void PPERequestParamDataBool(int requester_idx, int mat_id, int param_id, int data_type=0, int priority=0, int mask=PPOperators.SET, bool relative=false)
void PPERequestParamDataFloat(int requester_idx, int mat_id, int param_id, int data_type=0, int priority=0, int mask=PPOperators.SET, bool relative=false)
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Static component of PPE manager, used to hold the instance.
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Data for one material parameter, requester side.
base, not to be used directly, would lead to layering collisions!
void DbgPrnt(string text)
void SetTargetValueIntDefault(int mat_id, int param_idx)
int GetRequesterIDX()
Returns requester index.
void OnUpdate(float delta)
void SetTargetValueFloatDefault(int mat_id, int param_idx)
void Stop(Param par=null)
void ClearRequesterData()
void SetDefaultValuesAll()
Sets all requested values to default, ignoring them in further calculations.
void QueueValuesSend()
Sets this requester to update in the manager.
void PPERequesterBase(int requester_IDX)
void SetTargetValueColorDefault(int mat_id, int param_idx)
void SetTargetValueFloat(int mat_id, int param_idx, bool relative, float val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
bool IsRequesterRunning()
PPERequestParamDataBase GetRequestData(int mat_id, int param_idx, int type)
returns request data for specific parameter, or creates one if one does not exist in this request yet...
void OnStop(Param par=null)
automatically resets all material parameters of this requester to defaults
ref map< int, ref map< int, ref PPERequestParamDataBase > > m_RequestDataStructure
void SendCurrentValueData(PPERequestParamDataBase data)
void SetTargetValueBoolDefault(int mat_id, int param_idx)
map< int, ref map< int, ref PPERequestParamDataBase > > GetActiveRequestStructure()
PPERequestParamDataBase PrepareData(int mat_id, int param_idx, int type)
void SetTargetValueInt(int mat_id, int param_idx, bool relative, int val, int priority_layer, int operator=PPOperators.SET)
int GetCategoryMask()
mask for mass-handling methods like 'StopAllEffects'
void SetTargetValueColor(int mat_id, int param_idx, ref array< float > val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
void SetRequesterUpdating(bool state)
Has to be set for the requester to be handled.
void SetTargetValueBool(int mat_id, int param_idx, bool val, int priority_layer, int operator=PPOperators.SET)
override int GetCategoryMask()
void SetRequesterIDX(int idx)
automatically assigned by PPERequesterBank
float RelativizeValue(float value, int var_type, int mat_id, int param_id, bool relative)
converts all values used to relative values (if not relative already)
void Start(Param par=null)
void OnStart(Param par=null)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
void Error(string err)
Messagebox with error message.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...