mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 01:12:05 +07:00
New PlayMaker action: ChangeWorld
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
<Compile Include="Assets\IsoTools\Examples\Scripts\CubeAutoMovement.cs" />
|
<Compile Include="Assets\IsoTools\Examples\Scripts\CubeAutoMovement.cs" />
|
||||||
<Compile Include="Assets\IsoTools\Examples\Scripts\IsoEchoListener.cs" />
|
<Compile Include="Assets\IsoTools\Examples\Scripts\IsoEchoListener.cs" />
|
||||||
<Compile Include="Assets\IsoTools\Examples\Scripts\PlayerController.cs" />
|
<Compile Include="Assets\IsoTools\Examples\Scripts\PlayerController.cs" />
|
||||||
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoChangeWorld.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoComponentAction.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoComponentAction.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetMode.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetMode.cs" />
|
||||||
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetPosition.cs" />
|
<Compile Include="Assets\IsoTools\PlayMaker\Actions\IsoGetPosition.cs" />
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Prefab:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
value: 1.3000001
|
value: 1.4000001
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
@@ -441,10 +441,10 @@ MonoBehaviour:
|
|||||||
actionData:
|
actionData:
|
||||||
actionNames:
|
actionNames:
|
||||||
- IsoTools.PlayMaker.Actions.IsoTranslate
|
- IsoTools.PlayMaker.Actions.IsoTranslate
|
||||||
- HutongGames.PlayMaker.Actions.Wait
|
|
||||||
- IsoTools.PlayMaker.Actions.IsoGetPosition
|
- IsoTools.PlayMaker.Actions.IsoGetPosition
|
||||||
- IsoTools.PlayMaker.Actions.IsoGetSize
|
- IsoTools.PlayMaker.Actions.IsoGetSize
|
||||||
- IsoTools.PlayMaker.Actions.IsoGetMode
|
- IsoTools.PlayMaker.Actions.IsoGetMode
|
||||||
|
- HutongGames.PlayMaker.Actions.Wait
|
||||||
- PlayMaker.ConditionalExpression.ConditionalExpression
|
- PlayMaker.ConditionalExpression.ConditionalExpression
|
||||||
customNames:
|
customNames:
|
||||||
-
|
-
|
||||||
@@ -454,9 +454,9 @@ MonoBehaviour:
|
|||||||
-
|
-
|
||||||
-
|
-
|
||||||
actionEnabled: 010101010101
|
actionEnabled: 010101010101
|
||||||
actionIsOpen: 000000000100
|
actionIsOpen: 000000010100
|
||||||
actionStartIndex: 00000000090000000c00000012000000180000001b000000
|
actionStartIndex: 00000000090000000f00000015000000170000001a000000
|
||||||
actionHashCodes: 8ef8760048c011017ebd02027ebd020236f6fc01490c8701
|
actionHashCodes: 8ef876007ebd02027ebd0202672cde0348c01101490c8701
|
||||||
unityObjectParams: []
|
unityObjectParams: []
|
||||||
fsmGameObjectParams: []
|
fsmGameObjectParams: []
|
||||||
fsmOwnerDefaultParams:
|
fsmOwnerDefaultParams:
|
||||||
@@ -535,12 +535,6 @@ MonoBehaviour:
|
|||||||
showInInspector: 0
|
showInInspector: 0
|
||||||
networkSync: 0
|
networkSync: 0
|
||||||
value: 0
|
value: 0
|
||||||
- useVariable: 0
|
|
||||||
name:
|
|
||||||
tooltip:
|
|
||||||
showInInspector: 0
|
|
||||||
networkSync: 0
|
|
||||||
value: 1
|
|
||||||
- useVariable: 1
|
- useVariable: 1
|
||||||
name: iso_x
|
name: iso_x
|
||||||
tooltip:
|
tooltip:
|
||||||
@@ -577,6 +571,12 @@ MonoBehaviour:
|
|||||||
showInInspector: 0
|
showInInspector: 0
|
||||||
networkSync: 0
|
networkSync: 0
|
||||||
value: 0
|
value: 0
|
||||||
|
- useVariable: 0
|
||||||
|
name:
|
||||||
|
tooltip:
|
||||||
|
showInInspector: 0
|
||||||
|
networkSync: 0
|
||||||
|
value: 1
|
||||||
fsmIntParams: []
|
fsmIntParams: []
|
||||||
fsmBoolParams:
|
fsmBoolParams:
|
||||||
- useVariable: 1
|
- useVariable: 1
|
||||||
@@ -612,12 +612,12 @@ MonoBehaviour:
|
|||||||
- FINISHED
|
- FINISHED
|
||||||
- TO_RESET_POSITION
|
- TO_RESET_POSITION
|
||||||
-
|
-
|
||||||
byteData: 00000000010000000000
|
byteData: 000000000000010000
|
||||||
arrayParamSizes:
|
arrayParamSizes:
|
||||||
arrayParamTypes: []
|
arrayParamTypes: []
|
||||||
customTypeSizes:
|
customTypeSizes:
|
||||||
customTypeNames: []
|
customTypeNames: []
|
||||||
paramDataType: 140000001c0000000f0000000f0000000f000000010000000100000001000000010000000f0000001700000001000000140000001c0000000f0000000f0000000f00000001000000140000001c0000000f0000000f0000000f00000001000000140000002a00000001000000120000001700000017000000010000000100000011000000
|
paramDataType: 140000001c0000000f0000000f0000000f00000001000000010000000100000001000000140000001c0000000f0000000f0000000f00000001000000140000001c0000000f0000000f0000000f00000001000000140000002a0000000f0000001700000001000000120000001700000017000000010000000100000011000000
|
||||||
paramName:
|
paramName:
|
||||||
- gameObject
|
- gameObject
|
||||||
- vector
|
- vector
|
||||||
@@ -628,9 +628,6 @@ MonoBehaviour:
|
|||||||
- everyFrame
|
- everyFrame
|
||||||
- lateUpdate
|
- lateUpdate
|
||||||
- fixedUpdate
|
- fixedUpdate
|
||||||
- time
|
|
||||||
- finishEvent
|
|
||||||
- realTime
|
|
||||||
- gameObject
|
- gameObject
|
||||||
- vector
|
- vector
|
||||||
- x
|
- x
|
||||||
@@ -645,15 +642,17 @@ MonoBehaviour:
|
|||||||
- everyFrame
|
- everyFrame
|
||||||
- gameObject
|
- gameObject
|
||||||
- mode
|
- mode
|
||||||
- everyFrame
|
- time
|
||||||
|
- finishEvent
|
||||||
|
- realTime
|
||||||
- expression
|
- expression
|
||||||
- isTrueEvent
|
- isTrueEvent
|
||||||
- isFalseEvent
|
- isFalseEvent
|
||||||
- everyFrame
|
- everyFrame
|
||||||
- rawResult
|
- rawResult
|
||||||
- storeResult
|
- storeResult
|
||||||
paramDataPos: 000000000000000000000000010000000200000000000000010000000200000003000000030000000000000004000000010000000100000004000000050000000600000005000000020000000200000007000000080000000900000006000000030000000000000007000000000000000100000002000000080000000900000000000000
|
paramDataPos: 0000000000000000000000000100000002000000000000000100000002000000030000000100000001000000030000000400000005000000040000000200000002000000060000000700000008000000050000000300000000000000090000000000000006000000000000000100000002000000070000000800000000000000
|
||||||
paramByteDataSize: 000000000000000000000000000000000000000001000000010000000100000001000000000000000000000001000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001000000000000000000000001000000000000000000000000000000010000000100000000000000
|
paramByteDataSize: 0000000000000000000000000000000000000000010000000100000001000000010000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000000010000000100000000000000
|
||||||
- name: State 3
|
- name: State 3
|
||||||
description:
|
description:
|
||||||
colorIndex: 0
|
colorIndex: 0
|
||||||
@@ -895,7 +894,7 @@ Prefab:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
value: 1.4000001
|
value: 1.3000001
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
@@ -953,7 +952,7 @@ Prefab:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
value: 1.1
|
value: 1.2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
@@ -999,11 +998,11 @@ Prefab:
|
|||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: -0.0000019073486
|
value: -0.0000038146973
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: 15.999999
|
value: 31.999998
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
@@ -1031,11 +1030,11 @@ Prefab:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
||||||
propertyPath: _position.x
|
propertyPath: _position.x
|
||||||
value: 1
|
value: 2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
||||||
propertyPath: _position.y
|
propertyPath: _position.y
|
||||||
value: 1
|
value: 2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
|
||||||
propertyPath: _position.z
|
propertyPath: _position.z
|
||||||
@@ -1112,7 +1111,7 @@ Prefab:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
value: 1.2
|
value: 1.1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
|
|||||||
54
Assets/IsoTools/PlayMaker/Actions/IsoChangeWorld.cs
Normal file
54
Assets/IsoTools/PlayMaker/Actions/IsoChangeWorld.cs
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using HutongGames.PlayMaker;
|
||||||
|
|
||||||
|
namespace IsoTools.PlayMaker.Actions {
|
||||||
|
[ActionCategory("IsoTools")]
|
||||||
|
[HutongGames.PlayMaker.Tooltip("Change IsoWorld options.")]
|
||||||
|
public class IsoChangeWorld : FsmStateAction {
|
||||||
|
|
||||||
|
public FsmFloat tileSize;
|
||||||
|
public FsmFloat tileRatio;
|
||||||
|
public FsmFloat tileAngle;
|
||||||
|
public FsmFloat tileHeight;
|
||||||
|
public FsmFloat stepDepth;
|
||||||
|
public FsmFloat startDepth;
|
||||||
|
|
||||||
|
public override void Reset() {
|
||||||
|
tileSize = new FsmFloat{UseVariable = true};
|
||||||
|
tileRatio = new FsmFloat{UseVariable = true};
|
||||||
|
tileAngle = new FsmFloat{UseVariable = true};
|
||||||
|
tileHeight = new FsmFloat{UseVariable = true};
|
||||||
|
stepDepth = new FsmFloat{UseVariable = true};
|
||||||
|
startDepth = new FsmFloat{UseVariable = true};
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEnter() {
|
||||||
|
DoAction();
|
||||||
|
Finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoAction() {
|
||||||
|
var iso_world = GameObject.FindObjectOfType<IsoWorld>();
|
||||||
|
if ( iso_world ) {
|
||||||
|
if ( !tileSize.IsNone ) {
|
||||||
|
iso_world.tileSize = tileSize.Value;
|
||||||
|
}
|
||||||
|
if ( !tileRatio.IsNone ) {
|
||||||
|
iso_world.tileRatio = tileRatio.Value;
|
||||||
|
}
|
||||||
|
if ( !tileAngle.IsNone ) {
|
||||||
|
iso_world.tileAngle = tileAngle.Value;
|
||||||
|
}
|
||||||
|
if ( !tileHeight.IsNone ) {
|
||||||
|
iso_world.tileHeight = tileHeight.Value;
|
||||||
|
}
|
||||||
|
if ( !stepDepth.IsNone ) {
|
||||||
|
iso_world.stepDepth = stepDepth.Value;
|
||||||
|
}
|
||||||
|
if ( !startDepth.IsNone ) {
|
||||||
|
iso_world.startDepth = startDepth.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // IsoTools.PlayMaker.Actions
|
||||||
12
Assets/IsoTools/PlayMaker/Actions/IsoChangeWorld.cs.meta
Normal file
12
Assets/IsoTools/PlayMaker/Actions/IsoChangeWorld.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 989d7fb6aa6b440f185314c637d25bd5
|
||||||
|
timeCreated: 1450036398
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -9,34 +9,25 @@ namespace IsoTools.PlayMaker.Actions {
|
|||||||
[CheckForComponent(typeof(IsoObject))]
|
[CheckForComponent(typeof(IsoObject))]
|
||||||
public FsmOwnerDefault gameObject;
|
public FsmOwnerDefault gameObject;
|
||||||
|
|
||||||
|
[RequiredField]
|
||||||
[ObjectType(typeof(IsoObject.Mode))]
|
[ObjectType(typeof(IsoObject.Mode))]
|
||||||
[UIHint(UIHint.Variable)]
|
[UIHint(UIHint.Variable)]
|
||||||
public FsmEnum mode;
|
public FsmEnum mode;
|
||||||
|
|
||||||
public bool everyFrame;
|
|
||||||
|
|
||||||
public override void Reset() {
|
public override void Reset() {
|
||||||
gameObject = null;
|
gameObject = null;
|
||||||
mode = null;
|
mode = null;
|
||||||
everyFrame = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEnter() {
|
public override void OnEnter() {
|
||||||
DoAction();
|
DoAction();
|
||||||
if ( !everyFrame ) {
|
Finish();
|
||||||
Finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnUpdate() {
|
|
||||||
DoAction();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction() {
|
void DoAction() {
|
||||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||||
if ( UpdateCache(go) ) {
|
if ( UpdateCache(go) ) {
|
||||||
var value = isoObject.mode;
|
mode.Value = isoObject.mode;
|
||||||
mode.Value = value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace IsoTools.PlayMaker.Actions {
|
|||||||
[CheckForComponent(typeof(IsoObject))]
|
[CheckForComponent(typeof(IsoObject))]
|
||||||
public FsmOwnerDefault gameObject;
|
public FsmOwnerDefault gameObject;
|
||||||
|
|
||||||
|
[RequiredField]
|
||||||
[ObjectType(typeof(IsoObject.Mode))]
|
[ObjectType(typeof(IsoObject.Mode))]
|
||||||
public FsmEnum mode;
|
public FsmEnum mode;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user