mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-16 22:16:55 +07:00
New PlayMaker action: IsoGetSpeed
This commit is contained in:
@@ -60,6 +60,7 @@
|
|||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetMouseIsoTilePosition.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetMouseIsoTilePosition.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\IsoGetSpeed.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetTilePosition.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetTilePosition.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetTouchIsoPosition.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetTouchIsoPosition.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetTouchIsoTilePosition.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetTouchIsoTilePosition.cs" />
|
||||||
|
|||||||
@@ -1734,6 +1734,7 @@ MonoBehaviour:
|
|||||||
transitions: []
|
transitions: []
|
||||||
actionData:
|
actionData:
|
||||||
actionNames:
|
actionNames:
|
||||||
|
- IsoTools.PlayMaker.Actions.IsoGetSpeed
|
||||||
- IsoTools.PlayMaker.Actions.IsoGetVelocity
|
- IsoTools.PlayMaker.Actions.IsoGetVelocity
|
||||||
- IsoTools.PlayMaker.Events.IsoTriggerEvent
|
- IsoTools.PlayMaker.Events.IsoTriggerEvent
|
||||||
- IsoTools.PlayMaker.Events.IsoCollisionEvent
|
- IsoTools.PlayMaker.Events.IsoCollisionEvent
|
||||||
@@ -1741,10 +1742,11 @@ MonoBehaviour:
|
|||||||
-
|
-
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
actionEnabled: 010101
|
-
|
||||||
actionIsOpen: 010101
|
actionEnabled: 01010101
|
||||||
actionStartIndex: 00000000060000000b000000
|
actionIsOpen: 01010101
|
||||||
actionHashCodes: 7ebd02028802cd006a86ae01
|
actionStartIndex: 0000000003000000090000000e000000
|
||||||
|
actionHashCodes: 32d594027ebd02028802cd006a86ae01
|
||||||
unityObjectParams: []
|
unityObjectParams: []
|
||||||
fsmGameObjectParams:
|
fsmGameObjectParams:
|
||||||
- useVariable: 1
|
- useVariable: 1
|
||||||
@@ -1784,6 +1786,14 @@ MonoBehaviour:
|
|||||||
showInInspector: 0
|
showInInspector: 0
|
||||||
networkSync: 0
|
networkSync: 0
|
||||||
value: {fileID: 0}
|
value: {fileID: 0}
|
||||||
|
- ownerOption: 0
|
||||||
|
gameObject:
|
||||||
|
useVariable: 0
|
||||||
|
name:
|
||||||
|
tooltip:
|
||||||
|
showInInspector: 0
|
||||||
|
networkSync: 0
|
||||||
|
value: {fileID: 0}
|
||||||
animationCurveParams: []
|
animationCurveParams: []
|
||||||
functionCallParams: []
|
functionCallParams: []
|
||||||
fsmTemplateControlParams: []
|
fsmTemplateControlParams: []
|
||||||
@@ -1808,6 +1818,12 @@ MonoBehaviour:
|
|||||||
fsmArrayParams: []
|
fsmArrayParams: []
|
||||||
fsmEnumParams: []
|
fsmEnumParams: []
|
||||||
fsmFloatParams:
|
fsmFloatParams:
|
||||||
|
- useVariable: 1
|
||||||
|
name: iso_speed
|
||||||
|
tooltip:
|
||||||
|
showInInspector: 0
|
||||||
|
networkSync: 0
|
||||||
|
value: 0
|
||||||
- useVariable: 1
|
- useVariable: 1
|
||||||
name:
|
name:
|
||||||
tooltip:
|
tooltip:
|
||||||
@@ -1848,14 +1864,17 @@ MonoBehaviour:
|
|||||||
stringParams:
|
stringParams:
|
||||||
- TO_UP
|
- TO_UP
|
||||||
- TO_UP
|
- TO_UP
|
||||||
byteData: 010000000000000000
|
byteData: 01010000000000000000
|
||||||
arrayParamSizes:
|
arrayParamSizes:
|
||||||
arrayParamTypes: []
|
arrayParamTypes: []
|
||||||
customTypeSizes:
|
customTypeSizes:
|
||||||
customTypeNames: []
|
customTypeNames: []
|
||||||
paramDataType: 140000001c0000000f0000000f0000000f00000001000000140000000700000012000000170000001300000014000000070000001200000017000000130000000f000000
|
paramDataType: 140000000f00000001000000140000001c0000000f0000000f0000000f00000001000000140000000700000012000000170000001300000014000000070000001200000017000000130000000f000000
|
||||||
paramName:
|
paramName:
|
||||||
- gameObject
|
- gameObject
|
||||||
|
- storeResult
|
||||||
|
- everyFrame
|
||||||
|
- gameObject
|
||||||
- storeVector
|
- storeVector
|
||||||
- storeX
|
- storeX
|
||||||
- storeY
|
- storeY
|
||||||
@@ -1872,8 +1891,8 @@ MonoBehaviour:
|
|||||||
- sendEvent
|
- sendEvent
|
||||||
- storeIsoCollider
|
- storeIsoCollider
|
||||||
- storeForce
|
- storeForce
|
||||||
paramDataPos: 0000000000000000000000000100000002000000000000000100000001000000000000000000000000000000020000000500000001000000010000000100000003000000
|
paramDataPos: 0000000000000000000000000100000000000000010000000200000003000000010000000200000002000000000000000000000000000000030000000600000001000000010000000100000004000000
|
||||||
paramByteDataSize: 0000000000000000000000000000000000000000010000000000000004000000000000000000000000000000000000000400000000000000000000000000000000000000
|
paramByteDataSize: 0000000000000000010000000000000000000000000000000000000000000000010000000000000004000000000000000000000000000000000000000400000000000000000000000000000000000000
|
||||||
- name: up
|
- name: up
|
||||||
description:
|
description:
|
||||||
colorIndex: 0
|
colorIndex: 0
|
||||||
@@ -1992,7 +2011,13 @@ MonoBehaviour:
|
|||||||
linkConstraint: 0
|
linkConstraint: 0
|
||||||
colorIndex: 0
|
colorIndex: 0
|
||||||
variables:
|
variables:
|
||||||
floatVariables: []
|
floatVariables:
|
||||||
|
- useVariable: 1
|
||||||
|
name: iso_speed
|
||||||
|
tooltip:
|
||||||
|
showInInspector: 1
|
||||||
|
networkSync: 0
|
||||||
|
value: 0
|
||||||
intVariables: []
|
intVariables: []
|
||||||
boolVariables: []
|
boolVariables: []
|
||||||
stringVariables: []
|
stringVariables: []
|
||||||
@@ -2015,7 +2040,7 @@ MonoBehaviour:
|
|||||||
enumVariables: []
|
enumVariables: []
|
||||||
categories:
|
categories:
|
||||||
-
|
-
|
||||||
variableCategoryIDs: 00000000
|
variableCategoryIDs: 0000000000000000
|
||||||
description:
|
description:
|
||||||
docUrl:
|
docUrl:
|
||||||
showStateLabel: 1
|
showStateLabel: 1
|
||||||
|
|||||||
44
Assets/IsoTools/PlayMaker/Actions/IsoGetSpeed.cs
Normal file
44
Assets/IsoTools/PlayMaker/Actions/IsoGetSpeed.cs
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using HutongGames.PlayMaker;
|
||||||
|
using IsoTools.PlayMaker.Internal;
|
||||||
|
|
||||||
|
namespace IsoTools.PlayMaker.Actions {
|
||||||
|
[ActionCategory("IsoTools")]
|
||||||
|
[HutongGames.PlayMaker.Tooltip(
|
||||||
|
"Gets the Speed of a IsoRigidbody and stores it in a Float Variable.")]
|
||||||
|
public class IsoGetSpeed : IsoComponentAction<IsoRigidbody> {
|
||||||
|
[RequiredField]
|
||||||
|
[CheckForComponent(typeof(IsoRigidbody))]
|
||||||
|
public FsmOwnerDefault gameObject;
|
||||||
|
|
||||||
|
[RequiredField]
|
||||||
|
[UIHint(UIHint.Variable)]
|
||||||
|
public FsmFloat storeResult;
|
||||||
|
|
||||||
|
public bool everyFrame;
|
||||||
|
|
||||||
|
public override void Reset() {
|
||||||
|
gameObject = null;
|
||||||
|
storeResult = null;
|
||||||
|
everyFrame = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEnter() {
|
||||||
|
DoAction();
|
||||||
|
if ( !everyFrame ) {
|
||||||
|
Finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnUpdate() {
|
||||||
|
DoAction();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoAction() {
|
||||||
|
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||||
|
if ( UpdateCache(go) ) {
|
||||||
|
storeResult.Value = isoRigidbody.velocity.magnitude;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // IsoTools.PlayMaker.Actions
|
||||||
12
Assets/IsoTools/PlayMaker/Actions/IsoGetSpeed.cs.meta
Normal file
12
Assets/IsoTools/PlayMaker/Actions/IsoGetSpeed.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 47bdbba00b58348cd9376287604f29ce
|
||||||
|
timeCreated: 1450620446
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user