public void Init(PathGame pathGame) { this.pathGame = pathGame; parameters = pathGame.parameters; foreach (Param p in parameters) { p.pValue = 0; if (ChainPlayer) { p.OnParamActivation += ChainPlayer.ActivateStateFromParam; } OnParamChanging.Invoke(p); } }
public void SetParam(string name, float value, bool check = true) { if (check) { parameters.First(x => x.name == name).PValue = value; } else { parameters.First(x => x.name == name).pValue = value; } foreach (ConditionChange pch in parameters.First(x => x.name == name).autoActivatedChangesGUIDS) { if (ExpressionSolver.CalculateBool(pch.condition.conditionString, pch.condition.Parameters)) { foreach (ParamChanges pcha in pch.changes) { SetParam(pcha.aimParam.name, pcha.changeString, pcha.parameters, false); } } } OnParamChanging.Invoke(parameters.First(x => x.name == name)); }
public void CheckParam(string name) { OnParamChanging.Invoke(parameters.First(x => x.name == name)); }