mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 01:12:05 +07:00
fix PlayMaker actions
This commit is contained in:
@@ -6,7 +6,7 @@ using IsoTools.PlayMaker.Internal;
|
|||||||
namespace IsoTools.PlayMaker.Actions {
|
namespace IsoTools.PlayMaker.Actions {
|
||||||
[ActionCategory("IsoTools")]
|
[ActionCategory("IsoTools")]
|
||||||
[HutongGames.PlayMaker.Tooltip(
|
[HutongGames.PlayMaker.Tooltip(
|
||||||
"Gets the Mode of a IsoObject and stores it in a Enum Variable")]
|
"Gets the Renderers Mode of a IsoObject and stores it in a Enum Variable")]
|
||||||
public class IsoGetMode : IsoComponentAction<IsoObject> {
|
public class IsoGetMode : IsoComponentAction<IsoObject> {
|
||||||
[RequiredField]
|
[RequiredField]
|
||||||
[CheckForComponent(typeof(IsoObject))]
|
[CheckForComponent(typeof(IsoObject))]
|
||||||
@@ -14,14 +14,14 @@ namespace IsoTools.PlayMaker.Actions {
|
|||||||
public FsmOwnerDefault gameObject;
|
public FsmOwnerDefault gameObject;
|
||||||
|
|
||||||
[RequiredField]
|
[RequiredField]
|
||||||
[ObjectType(typeof(IsoObject.Mode))]
|
[ObjectType(typeof(IsoObject.RenderersMode))]
|
||||||
[UIHint(UIHint.Variable)]
|
[UIHint(UIHint.Variable)]
|
||||||
[HutongGames.PlayMaker.Title("Store Mode (Out)")]
|
[HutongGames.PlayMaker.Title("Store Renderers Mode (Out)")]
|
||||||
public FsmEnum storeMode;
|
public FsmEnum storeRenderersMode;
|
||||||
|
|
||||||
public override void Reset() {
|
public override void Reset() {
|
||||||
gameObject = null;
|
gameObject = null;
|
||||||
storeMode = null;
|
storeRenderersMode = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEnter() {
|
public override void OnEnter() {
|
||||||
@@ -32,7 +32,7 @@ namespace IsoTools.PlayMaker.Actions {
|
|||||||
void DoAction() {
|
void DoAction() {
|
||||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||||
if ( UpdateCache(go) ) {
|
if ( UpdateCache(go) ) {
|
||||||
storeMode.Value = isoObject.mode;
|
storeRenderersMode.Value = isoObject.renderersMode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ using IsoTools.PlayMaker.Internal;
|
|||||||
namespace IsoTools.PlayMaker.Actions {
|
namespace IsoTools.PlayMaker.Actions {
|
||||||
[ActionCategory("IsoTools")]
|
[ActionCategory("IsoTools")]
|
||||||
[HutongGames.PlayMaker.Tooltip(
|
[HutongGames.PlayMaker.Tooltip(
|
||||||
"Sets the Mode of a IsoObject.")]
|
"Sets the Renderers Mode of a IsoObject.")]
|
||||||
public class IsoSetMode : IsoComponentAction<IsoObject> {
|
public class IsoSetMode : IsoComponentAction<IsoObject> {
|
||||||
[RequiredField]
|
[RequiredField]
|
||||||
[CheckForComponent(typeof(IsoObject))]
|
[CheckForComponent(typeof(IsoObject))]
|
||||||
@@ -14,13 +14,13 @@ namespace IsoTools.PlayMaker.Actions {
|
|||||||
public FsmOwnerDefault gameObject;
|
public FsmOwnerDefault gameObject;
|
||||||
|
|
||||||
[RequiredField]
|
[RequiredField]
|
||||||
[ObjectType(typeof(IsoObject.Mode))]
|
[ObjectType(typeof(IsoObject.RenderersMode))]
|
||||||
[HutongGames.PlayMaker.Title("Mode (In)")]
|
[HutongGames.PlayMaker.Title("Renderers Mode (In)")]
|
||||||
public FsmEnum mode;
|
public FsmEnum renderersMode;
|
||||||
|
|
||||||
public override void Reset() {
|
public override void Reset() {
|
||||||
gameObject = null;
|
gameObject = null;
|
||||||
mode = IsoObject.Mode.Mode2d;
|
renderersMode = IsoObject.RenderersMode.Mode2d;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEnter() {
|
public override void OnEnter() {
|
||||||
@@ -31,7 +31,7 @@ namespace IsoTools.PlayMaker.Actions {
|
|||||||
void DoAction() {
|
void DoAction() {
|
||||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||||
if ( UpdateCache(go) ) {
|
if ( UpdateCache(go) ) {
|
||||||
isoObject.mode = (IsoObject.Mode)mode.Value;
|
isoObject.renderersMode = (IsoObject.RenderersMode)renderersMode.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user