PlayMaker Updates & Downloads > Share New Actions

Rewind Manager actions

(1/1)

blackant:
i added some actions for those like me how are using the asset "RewindManager" from asset store.

those are very simple basic actions, you should simply put the bool used for player control ability true or false.


--- Code: ---using UnityEngine;
using HutongGames.PlayMaker;

[ActionCategory("RewindManager")]
[Tooltip("DescriptionStart Rewinding Time Manager.")]
public class StopRewind : FsmStateAction
{
[RequiredField]
[UIHint(UIHint.Variable)]
[Tooltip("Objects To Disable")]
public FsmBool EnablePlayerBool;


public override void Reset()
{
EnablePlayerBool = null;


}

// Code that runs on entering the state.
public override void OnEnter()
{
RewindManager.StopRewind();

Finish();
}

void Update ()
{
if (RewindManager.RewindStarted == false)
{
EnablePlayerBool = false;
}
else
{
EnablePlayerBool = true;
}
}

}

--- End code ---

blackant:
and the stop action:


--- Code: ---using UnityEngine;
using HutongGames.PlayMaker;

[ActionCategory("RewindManager")]
[Tooltip("DescriptionStart Rewinding Time Manager.")]
public class StopRewind : FsmStateAction
{
[RequiredField]
[UIHint(UIHint.Variable)]
[Tooltip("Objects To Disable")]
public FsmBool EnablePlayerBool;


public override void Reset()
{
EnablePlayerBool = null;


}

// Code that runs on entering the state.
public override void OnEnter()
{
RewindManager.StopRewind();

Finish();
}

void Update ()
{
if (RewindManager.RewindStarted == false)
{
EnablePlayerBool = false;
}
else
{
EnablePlayerBool = true;
}
}

}
--- End code ---

Navigation

[0] Message Index

Go to full version