Exemplo n.º 1
0
    //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;
    }
Exemplo n.º 2
0
 public FloatPointerAnimation(MyGame theGame, FloatContainer valueToAnimate, float targetValue, int playAmount)
     : base(theGame, playAmount)
 {
     m_startValue     = valueToAnimate.Value;
     m_endValue       = targetValue;
     m_valueToAnimate = valueToAnimate;
 }
Exemplo n.º 3
0
    // 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;
    }
Exemplo n.º 4
0
    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>");
    }
Exemplo n.º 5
0
    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);
        }
    }
Exemplo n.º 6
0
 public void UpdateChanges(FloatContainer variable)
 {
     slider.value = variable.Value;
 }
Exemplo n.º 7
0
 public void AddAmount(FloatContainer amount)
 {
     Value += amount.Value;
 }
Exemplo n.º 8
0
 public void ResetAbility()
 {
     ability = null;
 }
Exemplo n.º 9
0
 public void SetAbility(FloatContainer ability)
 {
     this.ability = ability;
 }
Exemplo n.º 10
0
 public FloatPointerAnimation(MyGame theGame, FloatContainer valueToAnimate, float targetValue, int playAmount)
     : base(theGame, playAmount)
 {
     m_startValue = valueToAnimate.Value;
     m_endValue = targetValue;
     m_valueToAnimate = valueToAnimate;
 }
Exemplo n.º 11
0
 // 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;
 }
Exemplo n.º 12
0
 // constructor
 public FloatPair(FloatContainer target, float effector, string operation)
 {
     this.target   = target;
     this.effector = effector;
 }
Exemplo n.º 13
0
 public void ChangeVolume(FloatContainer volume)
 {
     audioMixer.SetFloat(volume.name, Mathf.Log10(volume.Value) * 20);
     PlayerPrefs.SetFloat(volume.name, volume.Value);
 }