//incoplete public void PassValue(Activity activity) { name = activity.name; animationTrigger = activity.animationTrigger; trannsitionDelay = activity.trannsitionDelay; energyPerHour = activity.energyPerHour; cost = activity.cost; limitPerDay = activity.limitPerDay; isDutrationAjustable = activity.isDutrationAjustable; duration.SetValue(activity.duration); isIncreaseStress = activity.isIncreaseStress; increasedStressModifier = activity.increasedStressModifier; isDecreaseStress = activity.isDecreaseStress; decreasedStressModifier = activity.decreasedStressModifier; isChangeOtherStat = activity.isChangeOtherStat; isEffectedByStress = activity.isEffectedByStress; changedStat = activity.changedStat; changedStatModifier = activity.changedStatModifier; interest = activity.interest; ability = activity.ability; }
public FloatPointerAnimation(MyGame theGame, FloatContainer valueToAnimate, float targetValue, int playAmount) : base(theGame, playAmount) { m_startValue = valueToAnimate.Value; m_endValue = targetValue; m_valueToAnimate = valueToAnimate; }
// used to pass.Value to other instace of this class public void PassValue(FloatPair floatPair) { target = floatPair.target; effector = floatPair.effector; useRange = floatPair.useRange; min = floatPair.min; max = floatPair.max; useExternalEeffector = floatPair.useExternalEeffector; externalEffector = floatPair.externalEffector; }
public void UpdateText(FloatContainer text) { if (WholeNumber) { UIText.text = BeforeText + Mathf.Round(text.Value).ToString() + AfterText; } else { UIText.text = BeforeText + text.Value.ToString() + AfterText; } UIText.text = UIText.text.Replace("/n", "<br>"); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); GUI.enabled = Application.isPlaying; FloatContainer m_Target = target as FloatContainer; if (GUILayout.Button("Update Changes")) { m_Target.OnValueChanged.Invoke(m_Target); } }
public void UpdateChanges(FloatContainer variable) { slider.value = variable.Value; }
public void AddAmount(FloatContainer amount) { Value += amount.Value; }
public void ResetAbility() { ability = null; }
public void SetAbility(FloatContainer ability) { this.ability = ability; }
public FloatPointerAnimation(MyGame theGame, FloatContainer valueToAnimate, float targetValue, int playAmount) : base(theGame, playAmount) { m_startValue = valueToAnimate.Value; m_endValue = targetValue; m_valueToAnimate = valueToAnimate; }
// counstructor tp be used if using external effector.Value public FloatPair(FloatContainer target, FloatContainer externalEffector, string operation) { this.target = target; this.externalEffector = externalEffector; useExternalEeffector = true; }
// constructor public FloatPair(FloatContainer target, float effector, string operation) { this.target = target; this.effector = effector; }
public void ChangeVolume(FloatContainer volume) { audioMixer.SetFloat(volume.name, Mathf.Log10(volume.Value) * 20); PlayerPrefs.SetFloat(volume.name, volume.Value); }