mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 09:16:08 +07:00
PlayMaker: remove tileposition actions
This commit is contained in:
@@ -54,12 +54,10 @@
|
|||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoComponentAction.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoComponentAction.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetPosition.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetPosition.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetSize.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetSize.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetTilePosition.cs" />
|
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoResize.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoResize.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoSetMode.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoSetMode.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoSetPosition.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoSetPosition.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoSetSize.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoSetSize.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoSetTilePosition.cs" />
|
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoTranslate.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoTranslate.cs" />
|
||||||
<Compile Include="Assets\IsoTools\Scripts\IsoBoxCollider.cs" />
|
<Compile Include="Assets\IsoTools\Scripts\IsoBoxCollider.cs" />
|
||||||
<Compile Include="Assets\IsoTools\Scripts\IsoCollider.cs" />
|
<Compile Include="Assets\IsoTools\Scripts\IsoCollider.cs" />
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using HutongGames.PlayMaker;
|
|
||||||
|
|
||||||
namespace IsoTools.PlayMaker.Actions {
|
|
||||||
[ActionCategory("IsoTools")]
|
|
||||||
[HutongGames.PlayMaker.Tooltip("Gets the TilePosition of a IsoObject and stores it in a Vector3 Variable or each Axis in a Float Variable")]
|
|
||||||
public class IsoGetTilePosition : IsoComponentAction<IsoObject> {
|
|
||||||
[RequiredField]
|
|
||||||
[CheckForComponent(typeof(IsoObject))]
|
|
||||||
public FsmOwnerDefault gameObject;
|
|
||||||
|
|
||||||
[UIHint(UIHint.Variable)]
|
|
||||||
public FsmVector3 vector;
|
|
||||||
|
|
||||||
[UIHint(UIHint.Variable)]
|
|
||||||
public FsmFloat x;
|
|
||||||
|
|
||||||
[UIHint(UIHint.Variable)]
|
|
||||||
public FsmFloat y;
|
|
||||||
|
|
||||||
[UIHint(UIHint.Variable)]
|
|
||||||
public FsmFloat z;
|
|
||||||
|
|
||||||
public bool everyFrame;
|
|
||||||
|
|
||||||
public override void Reset() {
|
|
||||||
gameObject = null;
|
|
||||||
vector = null;
|
|
||||||
x = null;
|
|
||||||
y = null;
|
|
||||||
z = null;
|
|
||||||
everyFrame = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnEnter() {
|
|
||||||
DoGetPosition();
|
|
||||||
if ( !everyFrame ) {
|
|
||||||
Finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnUpdate() {
|
|
||||||
DoGetPosition();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoGetPosition() {
|
|
||||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
|
||||||
if ( UpdateCache(go) ) {
|
|
||||||
var value = isoObject.tilePosition;
|
|
||||||
vector.Value = value;
|
|
||||||
x.Value = value.x;
|
|
||||||
y.Value = value.y;
|
|
||||||
z.Value = value.z;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // IsoTools.PlayMaker.Actions
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 99d3fea41e1994d8ca652d40c6e8bae5
|
|
||||||
timeCreated: 1450007591
|
|
||||||
licenseType: Free
|
|
||||||
MonoImporter:
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using HutongGames.PlayMaker;
|
|
||||||
|
|
||||||
namespace IsoTools.PlayMaker.Actions {
|
|
||||||
[ActionCategory("IsoTools")]
|
|
||||||
[HutongGames.PlayMaker.Tooltip("Sets the TilePosition of a IsoObject. To leave any axis unchanged, set variable to 'None'.")]
|
|
||||||
public class IsoSetTilePosition : IsoComponentAction<IsoObject> {
|
|
||||||
[RequiredField]
|
|
||||||
[CheckForComponent(typeof(IsoObject))]
|
|
||||||
public FsmOwnerDefault gameObject;
|
|
||||||
|
|
||||||
[UIHint(UIHint.Variable)]
|
|
||||||
public FsmVector3 vector;
|
|
||||||
|
|
||||||
public FsmFloat x;
|
|
||||||
public FsmFloat y;
|
|
||||||
public FsmFloat z;
|
|
||||||
|
|
||||||
public bool everyFrame;
|
|
||||||
public bool lateUpdate;
|
|
||||||
public bool fixedUpdate;
|
|
||||||
|
|
||||||
public override void Reset() {
|
|
||||||
gameObject = null;
|
|
||||||
vector = null;
|
|
||||||
x = new FsmFloat{UseVariable = true};
|
|
||||||
y = new FsmFloat{UseVariable = true};
|
|
||||||
z = new FsmFloat{UseVariable = true};
|
|
||||||
everyFrame = false;
|
|
||||||
lateUpdate = false;
|
|
||||||
fixedUpdate = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnPreprocess() {
|
|
||||||
Fsm.HandleFixedUpdate = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnEnter() {
|
|
||||||
if ( !everyFrame && !lateUpdate && !fixedUpdate ) {
|
|
||||||
DoSetTilePosition();
|
|
||||||
Finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnUpdate() {
|
|
||||||
if ( !lateUpdate && !fixedUpdate ) {
|
|
||||||
DoSetTilePosition();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnLateUpdate() {
|
|
||||||
if ( lateUpdate ) {
|
|
||||||
DoSetTilePosition();
|
|
||||||
}
|
|
||||||
if ( !everyFrame ) {
|
|
||||||
Finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnFixedUpdate() {
|
|
||||||
if ( fixedUpdate ) {
|
|
||||||
DoSetTilePosition();
|
|
||||||
}
|
|
||||||
if ( !everyFrame ) {
|
|
||||||
Finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoSetTilePosition() {
|
|
||||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
|
||||||
if ( UpdateCache(go) ) {
|
|
||||||
var value = vector.IsNone
|
|
||||||
? isoObject.tilePosition
|
|
||||||
: vector.Value;
|
|
||||||
|
|
||||||
if ( !x.IsNone ) {
|
|
||||||
value.x = x.Value;
|
|
||||||
}
|
|
||||||
if ( !y.IsNone ) {
|
|
||||||
value.y = y.Value;
|
|
||||||
}
|
|
||||||
if ( !z.IsNone ) {
|
|
||||||
value.z = z.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
isoObject.tilePosition = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // IsoTools.PlayMaker.Actions
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: da4f9180d267144b0ab45cccd2ac2787
|
|
||||||
timeCreated: 1450007606
|
|
||||||
licenseType: Free
|
|
||||||
MonoImporter:
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Reference in New Issue
Block a user