mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-14 17:09:31 +07:00
+Playmaker
This commit is contained in:
@@ -46,6 +46,45 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Assets\IsoTools\Editor\IsoObjectEditor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Editor\GetDistanceEditor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Editor\LookAtActionEditor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Editor\MoveTowardsActionEditor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Editor\SetCameraFOVActionEditor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\AboutWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\ContextToolWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmActionWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmComponentInspector.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmEditorHelpers.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmEditorWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmErrorWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmEventsWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmGlobalsWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmLogWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmSelectorWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmStateWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmTemplate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmTemplateEditor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmTemplateWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\FsmTimelineWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerAutoUpdater.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerBugReportWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerBuildCallbacks.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerCustomActionWizard.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerGUIInspector.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerGlobalsInspector.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerMainMenu.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerProjectTools.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerUpdater.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerUpgradeGuide.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerUpgradeTools.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\PlayMakerWelcomeWindow.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Editor\ReportWindow.cs" />
|
||||
<Compile Include="Assets\iTween\PlayMaker\Editor\iTweenMoveToActionEditor.cs" />
|
||||
<None Include="Assets\PlayMaker\Templates\readme.txt" />
|
||||
<None Include="Assets\PlayMaker\Readme.txt" />
|
||||
<None Include="Assets\iTween\ReadMe!\ReadMe!.txt" />
|
||||
<None Include="Assets\PlayMaker\Resources\PlayMakerAssemblies.txt" />
|
||||
<None Include="Assets\PlayMaker\Versions\readme.txt" />
|
||||
<Reference Include="UnityEditor.Advertisements">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Advertisements/Editor/UnityEditor.Advertisements.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -70,6 +109,51 @@
|
||||
<Reference Include="UnityEditor.TreeEditor">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ConditionalExpression">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/ConditionalExpression.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ConditionalExpressionEditor">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/ConditionalExpressionEditor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/PlayMakerEditor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditorResources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/PlayMakerEditorResources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.de.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/de/PlayMakerEditor.de.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.es-ES.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/es-ES/PlayMakerEditor.es-ES.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.fr.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/fr/PlayMakerEditor.fr.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.it.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/it/PlayMakerEditor.it.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.ja.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/ja/PlayMakerEditor.ja.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.nl.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/nl/PlayMakerEditor.nl.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.pt-BR.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/pt-BR/PlayMakerEditor.pt-BR.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.sv-SE.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/sv-SE/PlayMakerEditor.sv-SE.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.zh-CN.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/zh-CN/PlayMakerEditor.zh-CN.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMakerEditor.zh-TW.resources">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/Editor/zh-TW/PlayMakerEditor.zh-TW.resources.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMaker">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/Plugins/PlayMaker/PlayMaker.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Graphs">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.Graphs.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -65,12 +65,607 @@
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoSphereCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoUtils.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoWorld.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ActivateGameObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AddAnimationClip.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AddComponent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AddExplosionForce.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AddForce.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AddMixingTransform.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AddScript.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AddTorque.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\AnimateColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\AnimateFloatV2.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\AnimateFsmAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\AnimateRect.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\AnimateVector3.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\CurveColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\CurveFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\CurveFsmAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\CurveRect.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\CurveVector3.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\EaseColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\EaseFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\EaseFsmAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\EaseRect.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimateVariables\EaseVector3.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnimationSettings.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AnyKey.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ApplicationQuit.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ApplicationRunInBackground.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayAdd.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayAddRange.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayClear.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayContains.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayDeleteAt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayForEach.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayGet.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayGetNext.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayGetRandom.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayLength.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayResize.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayReverse.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArraySet.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayShuffle.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArraySort.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\ArrayTransferValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Array\FsmArraySet.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AudioMute.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AudioPause.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AudioPlay.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AudioStop.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\AxisEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BaseLogAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BlendAnimation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Blink.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BoolAllTrue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BoolAnyTrue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BoolChanged.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BoolFlip.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BoolNoneTrue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BoolOperator.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BoolTest.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BroadcastEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\BuildString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CallMethod.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CallStaticMethod.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CameraFadeIn.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CameraFadeOut.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CapturePoseAsAnimationClip.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CollisionEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ColorInterpolate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ColorRamp.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Comment.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ComponentAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ControllerIsGrounded.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ControllerMove.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ControllerSettings.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ControllerSimpleMove.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertBoolToColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertBoolToFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertBoolToInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertBoolToString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertEnumToString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertFloatToInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertFloatToString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertIntToFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertIntToString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertMaterialToObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertSecondsToString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ConvertStringToInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CreateEmptyObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CreateObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\CutToCamera.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugBool.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugDrawShape.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugEnum.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugFsmVariable.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugGameObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugLog.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DebugVector3.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DestroyComponent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DestroyObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DestroyObjects.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DestroySelf.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DetachChildren.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DetectDeviceOrientation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DeviceOrientationEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DevicePlayFullScreenMovie.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DeviceShakeEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DeviceVibrate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DontDestroyOnLoad.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DrawDebugLine.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DrawDebugRay.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DrawFullscreenColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DrawStateLabel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\DrawTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\EnableAnimation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\EnableBehaviour.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\EnableFSM.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\EnableFog.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\EnableGUI.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\EnumCompare.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\EnumSwitch.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Explosion.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FindChild.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FindClosest.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FindGameObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FinishFSM.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Flicker.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatAbs.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatAdd.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatAddMultiple.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatChanged.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatClamp.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatCompare.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatDivide.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatInterpolate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatMultiply.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatOperator.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatSignTest.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatSubtract.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FloatSwitch.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FormatString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ForwardAllEvents.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ForwardEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FsmEventOptions.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FsmStateSwitch.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\FsmStateTest.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUIAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUIBox.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUIButton.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUIContentAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUIElementHitTest.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUIHorizontalSlider.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILabel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutBeginArea.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutBeginAreaFollowObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutBeginCentered.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutBeginHorizontal.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutBeginScrollView.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutBeginVertical.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutBox.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutButton.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutConfirmPasswordField.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutEmailField.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutEndArea.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutEndCentered.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutEndHorizontal.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutEndScrollView.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutEndVertical.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutFlexibleSpace.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutFloatField.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutFloatLabel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutHorizontalSlider.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutIntField.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutIntLabel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutLabel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutPasswordField.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutRepeatButton.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutSelectionGrid.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutSpace.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutTextField.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutTextLabel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutToggle.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutToolbar.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUILayoutVerticalSlider.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUITooltip.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GUIVerticalSlider.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GameObjectChanged.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GameObjectCompare.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GameObjectCompareTag.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GameObjectHasChildren.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GameObjectIsChildOf.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GameObjectIsNull.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GameObjectIsVisible.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GameObjectTagSwitch.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetAngleToTarget.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetAxis.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetAxisVector.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetButton.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetButtonDown.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetButtonUp.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetChild.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetChildCount.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetChildNum.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetCollisionInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetColorRGBA.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetComponent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetControllerCollisionFlags.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetControllerHitInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetDeviceAcceleration.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetDeviceRoll.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetDistance.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetEventInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmBool.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmEnum.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmGameObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmMaterial.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmQuaternion.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmRect.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmState.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmVariable.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmVariables.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmVector2.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetFsmVector3.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetIPhoneSettings.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetKey.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetKeyDown.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetKeyUp.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetLastEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetLayer.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetLocationInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMainCamera.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMass.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMaterial.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMaterialTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMouseButton.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMouseButtonDown.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMouseButtonUp.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMouseX.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetMouseY.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetName.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetNextChild.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetOwner.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetParent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetPosition.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetPreviousStateName.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetProperty.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetRandomChild.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetRandomObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetRaycastHitInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetRectFields.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetRoot.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetRotation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetScale.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetScreenHeight.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetScreenWidth.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetSpeed.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetStringLeft.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetStringLength.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetStringRight.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetSubstring.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetSystemDateTime.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetTag.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetTagCount.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetTimeInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetTouchCount.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetTouchInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetTransform.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetTriggerInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetVector3XYZ.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetVectorLength.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetVelocity.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetVertexCount.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GetVertexPosition.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\GotoPreviousState.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\HasComponent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IncrementRenderQueue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IntAdd.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IntChanged.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IntClamp.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IntCompare.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IntOperator.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IntSwitch.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\InterpolateTransform.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\InverseTransformDirection.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\InverseTransformPoint.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\InvokeMethod.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IsKinematic.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\IsSleeping.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\KillDelayedEvents.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\LoadLevel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\LoadLevelNum.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\LookAt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\MouseLook.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\MouseLook2.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\MousePick.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\MousePickEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\MoveObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\MovePosition.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\MoveTowards.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\MovieTextureAudioSettings.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerClearHostList.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerGetHostCount.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerGetHostData.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerGetNextHostData.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerGetProperties.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerRegisterHost.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerRequestHostList.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerSetProperties.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\MasterServerUnregisterHost.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkCloseConnection.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkConnect.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkDestroy.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkDisconnect.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetAveragePing.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetConnectedPlayerProperties.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetConnectionsCount.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetIsMessageQueueRunning.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetLastPing.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetLocalPlayerProperties.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetMaximumConnections.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetMessagePlayerProperties.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetMinimumAllocatableViewIDs.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetNetworkDisconnectionInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetNetworkErrorInfo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetNextConnectedPlayerProperties.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetSendRate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkGetTime.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkHavePublicIpAddress.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkInitializeServer.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkInstantiate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkIsClient.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkIsServer.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkPeerTypeSwitch.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkSetIsMessageQueueRunning.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkSetLevelPrefix.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkSetLogLevel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkSetMaxConnections.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkSetMinimumAllocatableViewIDs.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkSetSendRate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkViewGetIsMine.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkViewGetViewId.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\NetworkViewRemoveRPCs.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\PlayMakerRPCProxy.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\SendRemoteEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\SendRemoteEventByProxy.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Network\StartServer.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\NextFrameEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ObjectCompare.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PauseMovieTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PerSecond.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayAnimation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayMovieTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayRandomAnimation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayRandomSound.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlaySound.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsDeleteAll.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsDeleteKey.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsGetFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsGetInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsGetString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsHasKey.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsSetFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsSetInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\PlayerPrefs\PlayerPrefsSetString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ProceduralMaterial\RebuildTextures.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ProceduralMaterial\SetProceduralBoolean.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ProceduralMaterial\SetProceduralColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ProceduralMaterial\SetProceduralFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ProjectLocationToMap.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RandomBool.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RandomEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RandomFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RandomInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RandomWait.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Raycast.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RaycastAll.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RectContains.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RectOverlaps.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RemoveMixingTransform.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ResetGUIMatrix.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ResetInputAxes.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RestartLevel.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RewindAnimation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Rotate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RotateGUI.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RunFSM.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\RunFSMAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SampleCurve.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ScaleGUI.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ScaleTime.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ScreenPick.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\ScreenToWorldPoint.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SelectRandomColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SelectRandomGameObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SelectRandomString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SelectRandomVector3.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SendEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SendEventByName.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SendEventToFsm.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SendMessage.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SendRandomEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SequenceEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAllFsmGameObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAmbientLight.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAnimationSpeed.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAnimationTime.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAnimationWeight.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAudioClip.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAudioLoop.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAudioPitch.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetAudioVolume.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetBackgroundColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetBoolValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetCameraCullingMask.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetCameraFOV.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetColorRGBA.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetColorValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetDrag.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetEnumValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetEventData.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetEventTarget.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFlareStrength.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFloatValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFogColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFogDensity.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmBool.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmEnum.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmGameObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmInt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmMaterial.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmQuaternion.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmRect.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmString.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmVariable.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmVector2.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetFsmVector3.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUIAlpha.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUIBackgroundColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUIColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUIContentColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUIDepth.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUISkin.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUIText.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUITexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUITextureAlpha.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGUITextureColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGameObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGameVolume.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetGravity.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetHaloStrength.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetIntFromFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetIntValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetIsKinematic.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetJointConnectedBody.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetLayer.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetLightColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetLightCookie.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetLightFlare.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetLightIntensity.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetLightRange.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetLightSpotAngle.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetLightType.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetMainCamera.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetMass.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetMaterial.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetMaterialColor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetMaterialFloat.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetMaterialMovieTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetMaterialTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetMouseCursor.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetName.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetObjectValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetParent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetPosition.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetProperty.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetRandomMaterial.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetRandomRotation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetRectFields.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetRectValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetRotation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetScale.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetShadowStrength.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetSkybox.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetStringValue.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetTag.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetTagsOnChildren.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetTextureOffset.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetTextureScale.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetVector3Value.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetVector3XYZ.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetVelocity.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SetVisibility.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Sleep.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SmoothFollowAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SmoothLookAt.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SmoothLookAtDirection.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StartCoroutine.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StartLocationServiceUpdates.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StopAnimation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StopLocationServiceUpdates.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StopMovieTexture.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StringChanged.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StringCompare.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StringContains.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StringReplace.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\StringSwitch.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\SwipeGestureEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TakeScreenshot.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TestAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TouchEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TouchGUIEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TouchObjectEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TrackMouseMovement.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TransformDirection.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TransformInputToWorldSpace.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TransformPoint.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Translate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\TriggerEvent.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\UseGUILayout.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\UseGravity.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3Add.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3AddXYZ.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3ClampMagnitude.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3HighPassFilter.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3Interpolate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3Invert.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3Lerp.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3LowPassFilter.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3Multiply.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3Normalize.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3Operator.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3PerSecond.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3RotateTowards.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Vector3Subtract.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\WWWObject.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\Wait.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\WakeAllRigidBodies.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\WakeUp.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\WorldToScreenPoint.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenFsmAction.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenLookFrom.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenLookTo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenLookUpdate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenMoveAdd.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenMoveBy.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenMoveFrom.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenMoveTo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenMoveUpdate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenPause.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenPunchPosition.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenPunchRotation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenPunchScale.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenResume.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenRotateAdd.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenRotateBy.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenRotateFrom.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenRotateTo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenRotateUpdate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenScaleAdd.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenScaleBy.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenScaleFrom.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenScaleTo.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenScaleUpdate.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenShakePosition.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenShakeRotation.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenShakeScale.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Actions\iTween\iTweenStop.cs" />
|
||||
<Compile Include="Assets\PlayMaker\Include\iTweenFSMEvents.cs" />
|
||||
<Compile Include="Assets\PlayMaker\UpdateHelper.cs" />
|
||||
<Compile Include="Assets\iTween\iTween.cs" />
|
||||
<None Include="Assets\PlayMaker\Templates\readme.txt" />
|
||||
<None Include="Assets\PlayMaker\Readme.txt" />
|
||||
<None Include="Assets\iTween\ReadMe!\ReadMe!.txt" />
|
||||
<None Include="Assets\PlayMaker\Resources\PlayMakerAssemblies.txt" />
|
||||
<None Include="Assets\PlayMaker\Versions\readme.txt" />
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.Networking">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ConditionalExpression">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/PlayMaker/ConditionalExpression.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PlayMaker">
|
||||
<HintPath>/Users/matov/Programming/Projects/unityiso/Assets/Plugins/PlayMaker/PlayMaker.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions.Xcode">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
9
Assets/Gizmos.meta
Normal file
9
Assets/Gizmos.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45bec39a4e05f45bb9a90acbe91399b0
|
||||
folderAsset: yes
|
||||
timeCreated: 1449957901
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Gizmos/PlayMakerFSM Icon.tiff
Executable file
BIN
Assets/Gizmos/PlayMakerFSM Icon.tiff
Executable file
Binary file not shown.
45
Assets/Gizmos/PlayMakerFSM Icon.tiff.meta
Executable file
45
Assets/Gizmos/PlayMakerFSM Icon.tiff.meta
Executable file
@@ -0,0 +1,45 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f728493f9ebb2324d94581b928975c04
|
||||
TextureImporter:
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
BIN
Assets/Gizmos/PlayMakerGUI Icon.tiff
Executable file
BIN
Assets/Gizmos/PlayMakerGUI Icon.tiff
Executable file
Binary file not shown.
45
Assets/Gizmos/PlayMakerGUI Icon.tiff.meta
Executable file
45
Assets/Gizmos/PlayMakerGUI Icon.tiff.meta
Executable file
@@ -0,0 +1,45 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7390251e5bc320f4abea3501d907f3e3
|
||||
TextureImporter:
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
BIN
Assets/Gizmos/PlayMakerGlobals Icon.tiff
Executable file
BIN
Assets/Gizmos/PlayMakerGlobals Icon.tiff
Executable file
Binary file not shown.
45
Assets/Gizmos/PlayMakerGlobals Icon.tiff.meta
Executable file
45
Assets/Gizmos/PlayMakerGlobals Icon.tiff.meta
Executable file
@@ -0,0 +1,45 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 846171814b98d1d48afa7805037eb0bc
|
||||
TextureImporter:
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
BIN
Assets/Gizmos/PlayMakerPrefs Icon.tiff
Executable file
BIN
Assets/Gizmos/PlayMakerPrefs Icon.tiff
Executable file
Binary file not shown.
45
Assets/Gizmos/PlayMakerPrefs Icon.tiff.meta
Executable file
45
Assets/Gizmos/PlayMakerPrefs Icon.tiff.meta
Executable file
@@ -0,0 +1,45 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4681a9805673831459ed595c2dc402d6
|
||||
TextureImporter:
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
BIN
Assets/Gizmos/PlaymakerIcon.tiff
Executable file
BIN
Assets/Gizmos/PlaymakerIcon.tiff
Executable file
Binary file not shown.
45
Assets/Gizmos/PlaymakerIcon.tiff.meta
Executable file
45
Assets/Gizmos/PlaymakerIcon.tiff.meta
Executable file
@@ -0,0 +1,45 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd021173169ae0c45840a63894bc27c0
|
||||
TextureImporter:
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
9
Assets/PlayMaker.meta
Normal file
9
Assets/PlayMaker.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e856374850964c5b87f19b12572d635
|
||||
folderAsset: yes
|
||||
timeCreated: 1449957738
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/PlayMaker/Actions.meta
Normal file
9
Assets/PlayMaker/Actions.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93a4fa665e56e446bacfaa603a05b17e
|
||||
folderAsset: yes
|
||||
timeCreated: 1449957901
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
132
Assets/PlayMaker/Actions/ActivateGameObject.cs
Executable file
132
Assets/PlayMaker/Actions/ActivateGameObject.cs
Executable file
@@ -0,0 +1,132 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.GameObject)]
|
||||
[Tooltip("Activates/deactivates a Game Object. Use this to hide/show areas, or enable/disable many Behaviours at once.")]
|
||||
public class ActivateGameObject : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[Tooltip("The GameObject to activate/deactivate.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[Tooltip("Check to activate, uncheck to deactivate Game Object.")]
|
||||
public FsmBool activate;
|
||||
|
||||
[Tooltip("Recursively activate/deactivate all children.")]
|
||||
public FsmBool recursive;
|
||||
|
||||
[Tooltip("Reset the game objects when exiting this state. Useful if you want an object to be active only while this state is active.\nNote: Only applies to the last Game Object activated/deactivated (won't work if Game Object changes).")]
|
||||
public bool resetOnExit;
|
||||
|
||||
[Tooltip("Repeat this action every frame. Useful if Activate changes over time.")]
|
||||
public bool everyFrame;
|
||||
|
||||
// store the game object that we activated on enter
|
||||
// so we can de-activate it on exit.
|
||||
GameObject activatedGameObject;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
activate = true;
|
||||
recursive = true;
|
||||
resetOnExit = false;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoActivateGameObject();
|
||||
|
||||
if (!everyFrame)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
DoActivateGameObject();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
// the stored game object might be invalid now
|
||||
if (activatedGameObject == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (resetOnExit)
|
||||
{
|
||||
if (recursive.Value)
|
||||
{
|
||||
#if UNITY_3_5 || UNITY_3_4
|
||||
activatedGameObject.SetActiveRecursively(!activate.Value);
|
||||
#else
|
||||
SetActiveRecursively(activatedGameObject, !activate.Value);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if UNITY_3_5 || UNITY_3_4
|
||||
activatedGameObject.active = !activate.Value;
|
||||
#else
|
||||
activatedGameObject.SetActive(!activate.Value);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoActivateGameObject()
|
||||
{
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
|
||||
if (go == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (recursive.Value)
|
||||
{
|
||||
#if UNITY_3_5 || UNITY_3_4
|
||||
go.SetActiveRecursively(activate.Value);
|
||||
#else
|
||||
SetActiveRecursively(go, activate.Value);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if UNITY_3_5 || UNITY_3_4
|
||||
go.active = activate.Value;
|
||||
#else
|
||||
go.SetActive(activate.Value);
|
||||
#endif
|
||||
}
|
||||
|
||||
activatedGameObject = go;
|
||||
}
|
||||
|
||||
#if !(UNITY_3_5 || UNITY_3_4)
|
||||
public void SetActiveRecursively(GameObject go, bool state)
|
||||
{
|
||||
go.SetActive(state);
|
||||
foreach (Transform child in go.transform)
|
||||
{
|
||||
SetActiveRecursively(child.gameObject, state);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public override string AutoName()
|
||||
{
|
||||
return (activate.Value ? "Activate " : "Deactivate ") + ActionHelpers.GetValueLabel(Fsm, gameObject);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/ActivateGameObject.cs.meta
Executable file
8
Assets/PlayMaker/Actions/ActivateGameObject.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc0e3ebc3fd22c6458e70283786cf795
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
76
Assets/PlayMaker/Actions/AddAnimationClip.cs
Executable file
76
Assets/PlayMaker/Actions/AddAnimationClip.cs
Executable file
@@ -0,0 +1,76 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Animation)]
|
||||
[Tooltip("Adds a named Animation Clip to a Game Object. Optionally trims the Animation.")]
|
||||
public class AddAnimationClip : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(Animation))]
|
||||
[Tooltip("The GameObject to add the Animation Clip to.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[ObjectType(typeof(AnimationClip))]
|
||||
[Tooltip("The animation clip to add. NOTE: Make sure the clip is compatible with the object's hierarchy.")]
|
||||
public FsmObject animationClip;
|
||||
|
||||
[RequiredField]
|
||||
[Tooltip("Name the animation. Used by other actions to reference this animation.")]
|
||||
public FsmString animationName;
|
||||
|
||||
[Tooltip("Optionally trim the animation by specifying a first and last frame.")]
|
||||
public FsmInt firstFrame;
|
||||
|
||||
[Tooltip("Optionally trim the animation by specifying a first and last frame.")]
|
||||
public FsmInt lastFrame;
|
||||
|
||||
[Tooltip("Add an extra looping frame that matches the first frame.")]
|
||||
public FsmBool addLoopFrame;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
animationClip = null;
|
||||
animationName = "";
|
||||
firstFrame = 0;
|
||||
lastFrame = 0;
|
||||
addLoopFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddAnimationClip();
|
||||
Finish();
|
||||
}
|
||||
|
||||
void DoAddAnimationClip()
|
||||
{
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if (go == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var animClip = animationClip.Value as AnimationClip;
|
||||
if (animClip == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var animation = go.GetComponent<Animation>();
|
||||
|
||||
if (firstFrame.Value == 0 && lastFrame.Value == 0)
|
||||
{
|
||||
animation.AddClip(animClip, animationName.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
animation.AddClip(animClip, animationName.Value, firstFrame.Value, lastFrame.Value, addLoopFrame.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AddAnimationClip.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AddAnimationClip.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b9bc61aa3cfd0e43818e823d44ac217
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
67
Assets/PlayMaker/Actions/AddComponent.cs
Executable file
67
Assets/PlayMaker/Actions/AddComponent.cs
Executable file
@@ -0,0 +1,67 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.GameObject)]
|
||||
[Tooltip("Adds a Component to a Game Object. Use this to change the behaviour of objects on the fly. Optionally remove the Component on exiting the state.")]
|
||||
public class AddComponent : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[Tooltip("The GameObject to add the Component to.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.ScriptComponent)]
|
||||
[Title("Component Type"), Tooltip("The type of Component to add to the Game Object.")]
|
||||
public FsmString component;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[ObjectType(typeof(Component))]
|
||||
[Tooltip("Store the component in an Object variable. E.g., to use with Set Property.")]
|
||||
public FsmObject storeComponent;
|
||||
|
||||
[Tooltip("Remove the Component when this State is exited.")]
|
||||
public FsmBool removeOnExit;
|
||||
|
||||
Component addedComponent;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
component = null;
|
||||
storeComponent = null;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddComponent();
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
if (removeOnExit.Value && addedComponent != null)
|
||||
{
|
||||
Object.Destroy(addedComponent);
|
||||
}
|
||||
}
|
||||
|
||||
void DoAddComponent()
|
||||
{
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if (go == null) return;
|
||||
|
||||
addedComponent = go.AddComponent(ReflectionUtils.GetGlobalType(component.Value));
|
||||
|
||||
storeComponent.Value = addedComponent;
|
||||
|
||||
if (addedComponent == null)
|
||||
{
|
||||
LogError("Can't add component: " + component.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AddComponent.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AddComponent.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a349bb54b28fb44899ea4c1539a9192
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
77
Assets/PlayMaker/Actions/AddExplosionForce.cs
Executable file
77
Assets/PlayMaker/Actions/AddExplosionForce.cs
Executable file
@@ -0,0 +1,77 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Physics)]
|
||||
[Tooltip("Applies a force to a Game Object that simulates explosion effects. The explosion force will fall off linearly with distance. Hint: Use the Explosion Action instead to apply an explosion force to all objects in a blast radius.")]
|
||||
public class AddExplosionForce : ComponentAction<Rigidbody>
|
||||
{
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(Rigidbody))]
|
||||
[Tooltip("The GameObject to add the explosion force to.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[Tooltip("The center of the explosion. Hint: this is often the position returned from a GetCollisionInfo action.")]
|
||||
public FsmVector3 center;
|
||||
|
||||
[RequiredField]
|
||||
[Tooltip("The strength of the explosion.")]
|
||||
public FsmFloat force;
|
||||
|
||||
[RequiredField]
|
||||
[Tooltip("The radius of the explosion. Force falls off linearly with distance.")]
|
||||
public FsmFloat radius;
|
||||
|
||||
[Tooltip("Applies the force as if it was applied from beneath the object. This is useful since explosions that throw things up instead of pushing things to the side look cooler. A value of 2 will apply a force as if it is applied from 2 meters below while not changing the actual explosion position.")]
|
||||
public FsmFloat upwardsModifier;
|
||||
|
||||
[Tooltip("The type of force to apply. See Unity Physics docs.")]
|
||||
public ForceMode forceMode;
|
||||
|
||||
[Tooltip("Repeat every frame while the state is active.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
center = new FsmVector3 { UseVariable = true };
|
||||
upwardsModifier = 0f;
|
||||
forceMode = ForceMode.Force;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnPreprocess()
|
||||
{
|
||||
Fsm.HandleFixedUpdate = true;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddExplosionForce();
|
||||
|
||||
if (!everyFrame)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate()
|
||||
{
|
||||
DoAddExplosionForce();
|
||||
}
|
||||
|
||||
void DoAddExplosionForce()
|
||||
{
|
||||
var go = gameObject.OwnerOption == OwnerDefaultOption.UseOwner ? Owner : gameObject.GameObject.Value;
|
||||
if (center == null || !UpdateCache(go))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rigidbody.AddExplosionForce(force.Value, center.Value, radius.Value, upwardsModifier.Value, forceMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AddExplosionForce.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AddExplosionForce.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4646286250465e744b99a313370fda17
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
111
Assets/PlayMaker/Actions/AddForce.cs
Executable file
111
Assets/PlayMaker/Actions/AddForce.cs
Executable file
@@ -0,0 +1,111 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Physics)]
|
||||
[Tooltip("Adds a force to a Game Object. Use Vector3 variable and/or Float variables for each axis.")]
|
||||
public class AddForce : ComponentAction<Rigidbody>
|
||||
{
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(Rigidbody))]
|
||||
[Tooltip("The GameObject to apply the force to.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("Optionally apply the force at a position on the object. This will also add some torque. The position is often returned from MousePick or GetCollisionInfo actions.")]
|
||||
public FsmVector3 atPosition;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("A Vector3 force to add. Optionally override any axis with the X, Y, Z parameters.")]
|
||||
public FsmVector3 vector;
|
||||
|
||||
[Tooltip("Force along the X axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat x;
|
||||
|
||||
[Tooltip("Force along the Y axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat y;
|
||||
|
||||
[Tooltip("Force along the Z axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat z;
|
||||
|
||||
[Tooltip("Apply the force in world or local space.")]
|
||||
public Space space;
|
||||
|
||||
[Tooltip("The type of force to apply. See Unity Physics docs.")]
|
||||
public ForceMode forceMode;
|
||||
|
||||
[Tooltip("Repeat every frame while the state is active.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
atPosition = new FsmVector3 { UseVariable = true };
|
||||
vector = null;
|
||||
// default axis to variable dropdown with None selected.
|
||||
x = new FsmFloat { UseVariable = true };
|
||||
y = new FsmFloat { UseVariable = true };
|
||||
z = new FsmFloat { UseVariable = true };
|
||||
space = Space.World;
|
||||
forceMode = ForceMode.Force;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnPreprocess()
|
||||
{
|
||||
Fsm.HandleFixedUpdate = true;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddForce();
|
||||
|
||||
if (!everyFrame)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate()
|
||||
{
|
||||
DoAddForce();
|
||||
}
|
||||
|
||||
void DoAddForce()
|
||||
{
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if (!UpdateCache(go))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var force = vector.IsNone ? new Vector3() : vector.Value;
|
||||
|
||||
// override any axis
|
||||
|
||||
if (!x.IsNone) force.x = x.Value;
|
||||
if (!y.IsNone) force.y = y.Value;
|
||||
if (!z.IsNone) force.z = z.Value;
|
||||
|
||||
// apply force
|
||||
|
||||
if (space == Space.World)
|
||||
{
|
||||
if (!atPosition.IsNone)
|
||||
{
|
||||
rigidbody.AddForceAtPosition(force, atPosition.Value, forceMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
rigidbody.AddForce(force, forceMode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rigidbody.AddRelativeForce(force,forceMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AddForce.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AddForce.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58ff055ba918aaa48b2f142ed5b7a00e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
66
Assets/PlayMaker/Actions/AddMixingTransform.cs
Executable file
66
Assets/PlayMaker/Actions/AddMixingTransform.cs
Executable file
@@ -0,0 +1,66 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Animation)]
|
||||
[Tooltip("Play an animation on a subset of the hierarchy. E.g., A waving animation on the upper body.")]
|
||||
public class AddMixingTransform : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(Animation))]
|
||||
[Tooltip("The GameObject playing the animation.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[Tooltip("The name of the animation to mix. NOTE: The animation should already be added to the Animation Component on the GameObject.")]
|
||||
public FsmString animationName;
|
||||
|
||||
[RequiredField]
|
||||
[Tooltip("The mixing transform. E.g., root/upper_body/left_shoulder")]
|
||||
public FsmString transform;
|
||||
|
||||
[Tooltip("If recursive is true all children of the mix transform will also be animated.")]
|
||||
public FsmBool recursive;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
animationName = "";
|
||||
transform = "";
|
||||
recursive = true;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddMixingTransform();
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
void DoAddMixingTransform()
|
||||
{
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if (go == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var animation = go.GetComponent<Animation>();
|
||||
if (animation == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var animClip = animation[animationName.Value];
|
||||
if (animClip == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var mixingTransform = go.transform.Find(transform.Value);
|
||||
animClip.AddMixingTransform(mixingTransform, recursive.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AddMixingTransform.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AddMixingTransform.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6cff7a6b1eb9d840aac5db6552a2780
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
59
Assets/PlayMaker/Actions/AddScript.cs
Executable file
59
Assets/PlayMaker/Actions/AddScript.cs
Executable file
@@ -0,0 +1,59 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.ScriptControl)]
|
||||
[Tooltip("Adds a Script to a Game Object. Use this to change the behaviour of objects on the fly. Optionally remove the Script on exiting the state.")]
|
||||
public class AddScript : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[Tooltip("The GameObject to add the script to.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[Tooltip("The Script to add to the GameObject.")]
|
||||
[UIHint(UIHint.ScriptComponent)]
|
||||
public FsmString script;
|
||||
|
||||
[Tooltip("Remove the script from the GameObject when this State is exited.")]
|
||||
public FsmBool removeOnExit;
|
||||
|
||||
Component addedComponent;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
script = null;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddComponent(gameObject.OwnerOption == OwnerDefaultOption.UseOwner ? Owner : gameObject.GameObject.Value);
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
if (removeOnExit.Value)
|
||||
{
|
||||
if (addedComponent != null)
|
||||
{
|
||||
Object.Destroy(addedComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoAddComponent(GameObject go)
|
||||
{
|
||||
addedComponent = go.AddComponent(ReflectionUtils.GetGlobalType(script.Value));
|
||||
|
||||
if (addedComponent == null)
|
||||
{
|
||||
LogError("Can't add script: " + script.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AddScript.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AddScript.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3963d96ed74c6f647897199a48079bfa
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
100
Assets/PlayMaker/Actions/AddTorque.cs
Executable file
100
Assets/PlayMaker/Actions/AddTorque.cs
Executable file
@@ -0,0 +1,100 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Physics)]
|
||||
[Tooltip("Adds torque (rotational force) to a Game Object.")]
|
||||
public class AddTorque : ComponentAction<Rigidbody>
|
||||
{
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(Rigidbody))]
|
||||
[Tooltip("The GameObject to add torque to.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("A Vector3 torque. Optionally override any axis with the X, Y, Z parameters.")]
|
||||
public FsmVector3 vector;
|
||||
|
||||
[Tooltip("Torque around the X axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat x;
|
||||
|
||||
[Tooltip("Torque around the Y axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat y;
|
||||
|
||||
[Tooltip("Torque around the Z axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat z;
|
||||
|
||||
[Tooltip("Apply the force in world or local space.")]
|
||||
public Space space;
|
||||
|
||||
[Tooltip("The type of force to apply. See Unity Physics docs.")]
|
||||
public ForceMode forceMode;
|
||||
|
||||
[Tooltip("Repeat every frame while the state is active.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
// default axis to variable dropdown with None selected.
|
||||
x = new FsmFloat { UseVariable = true };
|
||||
y = new FsmFloat { UseVariable = true };
|
||||
z = new FsmFloat { UseVariable = true };
|
||||
space = Space.World;
|
||||
forceMode = ForceMode.Force;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnPreprocess()
|
||||
{
|
||||
Fsm.HandleFixedUpdate = true;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddTorque();
|
||||
|
||||
if (!everyFrame)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate()
|
||||
{
|
||||
DoAddTorque();
|
||||
}
|
||||
|
||||
void DoAddTorque()
|
||||
{
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if (!UpdateCache(go))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var torque = vector.IsNone ? new Vector3(x.Value, y.Value, z.Value) : vector.Value;
|
||||
|
||||
// override any axis
|
||||
|
||||
if (!x.IsNone) torque.x = x.Value;
|
||||
if (!y.IsNone) torque.y = y.Value;
|
||||
if (!z.IsNone) torque.z = z.Value;
|
||||
|
||||
// apply
|
||||
|
||||
if (space == Space.World)
|
||||
{
|
||||
rigidbody.AddTorque(torque, forceMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
rigidbody.AddRelativeTorque(torque, forceMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AddTorque.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AddTorque.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d610dcc6fcb188943808607777423c4f
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
94
Assets/PlayMaker/Actions/AnimateFloat.cs
Executable file
94
Assets/PlayMaker/Actions/AnimateFloat.cs
Executable file
@@ -0,0 +1,94 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Animates the value of a Float Variable using an Animation Curve.")]
|
||||
public class AnimateFloat : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[Tooltip("The animation curve to use.")]
|
||||
public FsmAnimationCurve animCurve;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The float variable to set.")]
|
||||
public FsmFloat floatVariable;
|
||||
|
||||
[Tooltip("Optionally send an Event when the animation finishes.")]
|
||||
public FsmEvent finishEvent;
|
||||
|
||||
[Tooltip("Ignore TimeScale. Useful if the game is paused.")]
|
||||
public bool realTime;
|
||||
|
||||
private float startTime;
|
||||
private float currentTime;
|
||||
private float endTime;
|
||||
private bool looping;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
animCurve = null;
|
||||
floatVariable = null;
|
||||
finishEvent = null;
|
||||
realTime = false;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
startTime = FsmTime.RealtimeSinceStartup;
|
||||
currentTime = 0f;
|
||||
|
||||
if (animCurve != null && animCurve.curve != null && animCurve.curve.keys.Length > 0)
|
||||
{
|
||||
endTime = animCurve.curve.keys[animCurve.curve.length-1].time;
|
||||
looping = ActionHelpers.IsLoopingWrapMode(animCurve.curve.postWrapMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
|
||||
floatVariable.Value = animCurve.curve.Evaluate(0);
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
// update time
|
||||
|
||||
if (realTime)
|
||||
{
|
||||
currentTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentTime += Time.deltaTime;
|
||||
}
|
||||
|
||||
// update animation
|
||||
|
||||
if (animCurve != null && animCurve.curve != null && floatVariable != null)
|
||||
{
|
||||
floatVariable.Value = animCurve.curve.Evaluate(currentTime);
|
||||
}
|
||||
|
||||
// send finish event
|
||||
|
||||
if (currentTime >= endTime)
|
||||
{
|
||||
if (!looping)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
|
||||
if (finishEvent != null)
|
||||
{
|
||||
Fsm.Event(finishEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateFloat.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateFloat.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e775993337e0034e97e098d6575306c
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
9
Assets/PlayMaker/Actions/AnimateVariables.meta
Normal file
9
Assets/PlayMaker/Actions/AnimateVariables.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29c6cffa3711b4662b2d07f21c708ed0
|
||||
folderAsset: yes
|
||||
timeCreated: 1449957901
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
112
Assets/PlayMaker/Actions/AnimateVariables/AnimateColor.cs
Executable file
112
Assets/PlayMaker/Actions/AnimateVariables/AnimateColor.cs
Executable file
@@ -0,0 +1,112 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Animates the value of a Color Variable using an Animation Curve.")]
|
||||
public class AnimateColor : AnimateFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmColor colorVariable;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveR;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to colorVariable.r.")]
|
||||
public Calculation calculationR;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveG;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to colorVariable.g.")]
|
||||
public Calculation calculationG;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveB;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to colorVariable.b.")]
|
||||
public Calculation calculationB;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveA;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to colorVariable.a.")]
|
||||
public Calculation calculationA;
|
||||
|
||||
private bool finishInNextStep;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
colorVariable = new FsmColor{UseVariable=true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
|
||||
finishInNextStep = false;
|
||||
resultFloats = new float[4];
|
||||
fromFloats = new float[4];
|
||||
fromFloats[0] = colorVariable.IsNone ? 0f : colorVariable.Value.r;
|
||||
fromFloats[1] = colorVariable.IsNone ? 0f : colorVariable.Value.g;
|
||||
fromFloats[2] = colorVariable.IsNone ? 0f : colorVariable.Value.b;
|
||||
fromFloats[3] = colorVariable.IsNone ? 0f : colorVariable.Value.a;
|
||||
curves = new AnimationCurve[4];
|
||||
curves[0] = curveR.curve;
|
||||
curves[1] = curveG.curve;
|
||||
curves[2] = curveB.curve;
|
||||
curves[3] = curveA.curve;
|
||||
calculations = new Calculation[4];
|
||||
calculations[0] = calculationR;
|
||||
calculations[1] = calculationG;
|
||||
calculations[2] = calculationB;
|
||||
calculations[3] = calculationA;
|
||||
|
||||
Init();
|
||||
|
||||
// Set initial value
|
||||
if (Math.Abs(delay.Value) < 0.01f)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateVariableValue()
|
||||
{
|
||||
if (!colorVariable.IsNone)
|
||||
{
|
||||
colorVariable.Value = new Color(resultFloats[0], resultFloats[1], resultFloats[2], resultFloats[3]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
|
||||
if(isRunning)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
}
|
||||
|
||||
if(finishInNextStep)
|
||||
{
|
||||
if(!looping)
|
||||
{
|
||||
Finish();
|
||||
Fsm.Event(finishEvent);
|
||||
}
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateColor.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateColor.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 586d3af17311b5c46ab9ac5d3796b7f8
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
71
Assets/PlayMaker/Actions/AnimateVariables/AnimateFloatV2.cs
Executable file
71
Assets/PlayMaker/Actions/AnimateVariables/AnimateFloatV2.cs
Executable file
@@ -0,0 +1,71 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Animates the value of a Float Variable using an Animation Curve.")]
|
||||
public class AnimateFloatV2: AnimateFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat floatVariable;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve animCurve;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to floatVariable")]
|
||||
public Calculation calculation;
|
||||
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
floatVariable = new FsmFloat{UseVariable=true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
finishInNextStep = false;
|
||||
resultFloats = new float[1];
|
||||
fromFloats = new float[1];
|
||||
fromFloats[0] = floatVariable.IsNone ? 0f : floatVariable.Value;
|
||||
calculations = new Calculation[1];
|
||||
calculations[0] = calculation;
|
||||
curves = new AnimationCurve[1];
|
||||
curves[0] = animCurve.curve;
|
||||
//call Init after you have initialized curves array
|
||||
Init();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
if(!floatVariable.IsNone && isRunning){
|
||||
floatVariable.Value = resultFloats[0];
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
if(!looping) {
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!floatVariable.IsNone){
|
||||
floatVariable.Value = resultFloats[0];
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateFloatV2.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateFloatV2.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 746a13fb4786bc247a7248536b9a3890
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
282
Assets/PlayMaker/Actions/AnimateVariables/AnimateFsmAction.cs
Executable file
282
Assets/PlayMaker/Actions/AnimateVariables/AnimateFsmAction.cs
Executable file
@@ -0,0 +1,282 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
/// <summary>
|
||||
/// Base action for AnimateXXX actions
|
||||
/// </summary>
|
||||
public abstract class AnimateFsmAction : FsmStateAction
|
||||
{
|
||||
[Tooltip("Define time to use your curve scaled to be stretched or shrinked.")]
|
||||
public FsmFloat time;
|
||||
|
||||
[Tooltip("If you define speed, your animation will be speeded up or slowed down.")]
|
||||
public FsmFloat speed;
|
||||
|
||||
[Tooltip("Delayed animimation start.")]
|
||||
public FsmFloat delay;
|
||||
|
||||
[Tooltip("Animation curve start from any time. If IgnoreCurveOffset is true the animation starts right after the state become entered.")]
|
||||
public FsmBool ignoreCurveOffset;
|
||||
|
||||
[Tooltip("Optionally send an Event when the animation finishes.")]
|
||||
public FsmEvent finishEvent;
|
||||
|
||||
[Tooltip("Ignore TimeScale. Useful if the game is paused.")]
|
||||
public bool realTime;
|
||||
|
||||
private float startTime;
|
||||
private float currentTime;
|
||||
private float[] endTimes;
|
||||
|
||||
private float lastTime;
|
||||
private float deltaTime;
|
||||
private float delayTime;
|
||||
private float[] keyOffsets;
|
||||
|
||||
protected AnimationCurve[] curves;
|
||||
protected Calculation[] calculations;
|
||||
|
||||
protected float[] resultFloats;
|
||||
protected float[] fromFloats;
|
||||
protected float[] toFloats;
|
||||
|
||||
protected bool finishAction = false;
|
||||
protected bool isRunning;
|
||||
protected bool looping;
|
||||
private bool start = false;
|
||||
private float largestEndTime = 0f;
|
||||
|
||||
public enum Calculation{
|
||||
None,
|
||||
SetValue,
|
||||
AddToValue,
|
||||
SubtractFromValue,
|
||||
SubtractValueFromCurve,
|
||||
MultiplyValue,
|
||||
DivideValue,
|
||||
DivideCurveByValue,
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
finishEvent = null;
|
||||
realTime = false;
|
||||
time = new FsmFloat { UseVariable = true };
|
||||
speed = new FsmFloat { UseVariable = true };
|
||||
delay = new FsmFloat { UseVariable = true };
|
||||
ignoreCurveOffset = new FsmBool{ Value = true};
|
||||
resultFloats = new float[0];
|
||||
fromFloats = new float[0];
|
||||
toFloats = new float[0];
|
||||
endTimes = new float[0];
|
||||
keyOffsets = new float[0];
|
||||
curves = new AnimationCurve[0];
|
||||
finishAction = false;
|
||||
start = false;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
startTime = FsmTime.RealtimeSinceStartup;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
deltaTime = 0f;
|
||||
currentTime = 0f;
|
||||
isRunning = false;
|
||||
finishAction = false;
|
||||
looping = false;
|
||||
delayTime = delay.IsNone ? 0f : delayTime = delay.Value;
|
||||
start = true;
|
||||
}
|
||||
|
||||
protected void Init()
|
||||
{
|
||||
endTimes = new float[curves.Length];
|
||||
keyOffsets = new float[curves.Length];
|
||||
largestEndTime = 0f;
|
||||
for(int i = 0; i<curves.Length;i++)
|
||||
{
|
||||
if (curves[i] != null && curves[i].keys.Length > 0)
|
||||
{
|
||||
keyOffsets[i] = curves[i].keys.Length > 0 ? (time.IsNone ? curves[i].keys[0].time : (time.Value/curves[i].keys[curves[i].length-1].time)*curves[i].keys[0].time) : 0f;
|
||||
currentTime = ignoreCurveOffset.IsNone ? 0f : (ignoreCurveOffset.Value ? keyOffsets[i] : 0f);
|
||||
if(!time.IsNone) endTimes[i] = time.Value;
|
||||
else endTimes[i] = curves[i].keys[curves[i].length-1].time;
|
||||
if(largestEndTime < endTimes[i]) largestEndTime = endTimes[i];
|
||||
if(!looping) looping = ActionHelpers.IsLoopingWrapMode(curves[i].postWrapMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
endTimes[i] = -1f;
|
||||
}
|
||||
}
|
||||
for(int i = 0; i<curves.Length;i++)
|
||||
{
|
||||
if(largestEndTime > 0f && endTimes[i] == -1f) endTimes[i] = largestEndTime;
|
||||
else {
|
||||
if(largestEndTime == 0f && endTimes[i] == -1f)
|
||||
{
|
||||
if(time.IsNone) endTimes[i] = 1f;
|
||||
else endTimes[i] = time.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set initial result value
|
||||
UpdateAnimation();
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
CheckStart();
|
||||
|
||||
if(isRunning)
|
||||
{
|
||||
UpdateTime();
|
||||
UpdateAnimation();
|
||||
CheckFinished();
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckStart()
|
||||
{
|
||||
if (!isRunning && start)
|
||||
{
|
||||
if (delayTime >= 0)
|
||||
{
|
||||
if (realTime)
|
||||
{
|
||||
deltaTime = (FsmTime.RealtimeSinceStartup - startTime) - lastTime;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
delayTime -= deltaTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
delayTime -= Time.deltaTime;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
isRunning = true;
|
||||
start = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTime()
|
||||
{
|
||||
if (realTime)
|
||||
{
|
||||
deltaTime = (FsmTime.RealtimeSinceStartup - startTime) - lastTime;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
|
||||
if (!speed.IsNone) currentTime += deltaTime*speed.Value;
|
||||
else currentTime += deltaTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!speed.IsNone) currentTime += Time.deltaTime*speed.Value;
|
||||
else currentTime += Time.deltaTime;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateAnimation()
|
||||
{
|
||||
for (var k = 0; k < curves.Length; k++)
|
||||
{
|
||||
if (curves[k] != null && curves[k].keys.Length > 0)
|
||||
{
|
||||
if (calculations[k] != AnimateFsmAction.Calculation.None)
|
||||
{
|
||||
switch (calculations[k])
|
||||
{
|
||||
case Calculation.SetValue:
|
||||
if (!time.IsNone)
|
||||
resultFloats[k] =
|
||||
curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length - 1].time);
|
||||
else resultFloats[k] = curves[k].Evaluate(currentTime);
|
||||
break;
|
||||
case Calculation.AddToValue:
|
||||
if (!time.IsNone)
|
||||
resultFloats[k] = fromFloats[k] +
|
||||
curves[k].Evaluate((currentTime/time.Value)*
|
||||
curves[k].keys[curves[k].length - 1].time);
|
||||
else resultFloats[k] = fromFloats[k] + curves[k].Evaluate(currentTime);
|
||||
break;
|
||||
case Calculation.SubtractFromValue:
|
||||
if (!time.IsNone)
|
||||
resultFloats[k] = fromFloats[k] -
|
||||
curves[k].Evaluate((currentTime/time.Value)*
|
||||
curves[k].keys[curves[k].length - 1].time);
|
||||
else resultFloats[k] = fromFloats[k] - curves[k].Evaluate(currentTime);
|
||||
break;
|
||||
case Calculation.SubtractValueFromCurve:
|
||||
if (!time.IsNone)
|
||||
resultFloats[k] =
|
||||
curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length - 1].time) -
|
||||
fromFloats[k];
|
||||
else resultFloats[k] = curves[k].Evaluate(currentTime) - fromFloats[k];
|
||||
break;
|
||||
case Calculation.MultiplyValue:
|
||||
if (!time.IsNone)
|
||||
resultFloats[k] =
|
||||
curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length - 1].time)*
|
||||
fromFloats[k];
|
||||
else resultFloats[k] = curves[k].Evaluate(currentTime)*fromFloats[k];
|
||||
break;
|
||||
case Calculation.DivideValue:
|
||||
if (!time.IsNone)
|
||||
resultFloats[k] =
|
||||
curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length - 1].time) !=
|
||||
0f
|
||||
? fromFloats[k]/
|
||||
curves[k].Evaluate((currentTime/time.Value)*
|
||||
curves[k].keys[curves[k].length - 1].time)
|
||||
: float.MaxValue;
|
||||
else
|
||||
resultFloats[k] = curves[k].Evaluate(currentTime) != 0
|
||||
? fromFloats[k]/curves[k].Evaluate(currentTime)
|
||||
: float.MaxValue;
|
||||
break;
|
||||
case Calculation.DivideCurveByValue:
|
||||
if (!time.IsNone)
|
||||
resultFloats[k] = fromFloats[k] != 0f
|
||||
? curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length - 1].time)/
|
||||
fromFloats[k]
|
||||
: float.MaxValue;
|
||||
else
|
||||
resultFloats[k] = fromFloats[k] != 0
|
||||
? curves[k].Evaluate(currentTime)/fromFloats[k]
|
||||
: float.MaxValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
resultFloats[k] = fromFloats[k];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
resultFloats[k] = fromFloats[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckFinished()
|
||||
{
|
||||
if (isRunning && !looping)
|
||||
{
|
||||
finishAction = true;
|
||||
for (int i = 0; i < endTimes.Length; i++)
|
||||
{
|
||||
//Debug.Log(i.ToString() + "| " +endTimes[i].ToString() + " " + currentTime.ToString());
|
||||
if (currentTime < endTimes[i]) finishAction = false;
|
||||
}
|
||||
isRunning = !finishAction;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateFsmAction.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateFsmAction.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b94df5cd261931745bcc35e1aa451330
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
114
Assets/PlayMaker/Actions/AnimateVariables/AnimateRect.cs
Executable file
114
Assets/PlayMaker/Actions/AnimateVariables/AnimateRect.cs
Executable file
@@ -0,0 +1,114 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory("AnimateVariables")]
|
||||
[Tooltip("Animates the value of a Rect Variable using an Animation Curve.")]
|
||||
public class AnimateRect : AnimateFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmRect rectVariable;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveX;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to rectVariable.x.")]
|
||||
public Calculation calculationX;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveY;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to rectVariable.y.")]
|
||||
public Calculation calculationY;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveW;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to rectVariable.width.")]
|
||||
public Calculation calculationW;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveH;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to rectVariable.height.")]
|
||||
public Calculation calculationH;
|
||||
|
||||
private bool finishInNextStep;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
rectVariable = new FsmRect{UseVariable=true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
|
||||
finishInNextStep = false;
|
||||
resultFloats = new float[4];
|
||||
fromFloats = new float[4];
|
||||
fromFloats[0] = rectVariable.IsNone ? 0f : rectVariable.Value.x;
|
||||
fromFloats[1] = rectVariable.IsNone ? 0f : rectVariable.Value.y;
|
||||
fromFloats[2] = rectVariable.IsNone ? 0f : rectVariable.Value.width;
|
||||
fromFloats[3] = rectVariable.IsNone ? 0f : rectVariable.Value.height;
|
||||
curves = new AnimationCurve[4];
|
||||
curves[0] = curveX.curve;
|
||||
curves[1] = curveY.curve;
|
||||
curves[2] = curveW.curve;
|
||||
curves[3] = curveH.curve;
|
||||
calculations = new Calculation[4];
|
||||
calculations[0] = calculationX;
|
||||
calculations[1] = calculationY;
|
||||
calculations[2] = calculationW;
|
||||
calculations[3] = calculationH;
|
||||
|
||||
Init();
|
||||
|
||||
if (Math.Abs(delay.Value) < 0.01f)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void UpdateVariableValue()
|
||||
{
|
||||
if (!rectVariable.IsNone)
|
||||
{
|
||||
rectVariable.Value = new Rect(resultFloats[0], resultFloats[1], resultFloats[2], resultFloats[3]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
|
||||
if (isRunning)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
}
|
||||
|
||||
|
||||
if (finishInNextStep)
|
||||
{
|
||||
if(!looping)
|
||||
{
|
||||
Finish();
|
||||
Fsm.Event(finishEvent);
|
||||
}
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateRect.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateRect.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4683a6d913750504f830330947fddac8
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
104
Assets/PlayMaker/Actions/AnimateVariables/AnimateVector3.cs
Executable file
104
Assets/PlayMaker/Actions/AnimateVariables/AnimateVector3.cs
Executable file
@@ -0,0 +1,104 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Animates the value of a Vector3 Variable using an Animation Curve.")]
|
||||
public class AnimateVector3 : AnimateFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmVector3 vectorVariable;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveX;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to vectorVariable.x.")]
|
||||
public Calculation calculationX;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveY;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to vectorVariable.y.")]
|
||||
public Calculation calculationY;
|
||||
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveZ;
|
||||
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to vectorVariable.z.")]
|
||||
public Calculation calculationZ;
|
||||
|
||||
private bool finishInNextStep;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
vectorVariable = new FsmVector3{UseVariable=true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
|
||||
finishInNextStep = false;
|
||||
resultFloats = new float[3];
|
||||
fromFloats = new float[3];
|
||||
fromFloats[0] = vectorVariable.IsNone ? 0f : vectorVariable.Value.x;
|
||||
fromFloats[1] = vectorVariable.IsNone ? 0f : vectorVariable.Value.y;
|
||||
fromFloats[2] = vectorVariable.IsNone ? 0f : vectorVariable.Value.z;
|
||||
curves = new AnimationCurve[3];
|
||||
curves[0] = curveX.curve;
|
||||
curves[1] = curveY.curve;
|
||||
curves[2] = curveZ.curve;
|
||||
calculations = new Calculation[3];
|
||||
calculations[0] = calculationX;
|
||||
calculations[1] = calculationY;
|
||||
calculations[2] = calculationZ;
|
||||
|
||||
Init();
|
||||
|
||||
// Set initial value
|
||||
if (Math.Abs(delay.Value) < 0.01f)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateVariableValue()
|
||||
{
|
||||
if (!vectorVariable.IsNone)
|
||||
{
|
||||
vectorVariable.Value = new Vector3(resultFloats[0], resultFloats[1], resultFloats[2]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
|
||||
if(isRunning)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
}
|
||||
|
||||
if(finishInNextStep)
|
||||
{
|
||||
if(!looping)
|
||||
{
|
||||
Finish();
|
||||
Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep)
|
||||
{
|
||||
UpdateVariableValue();
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateVector3.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/AnimateVector3.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 096d312d970839340bb0b73993a5217e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
109
Assets/PlayMaker/Actions/AnimateVariables/CurveColor.cs
Executable file
109
Assets/PlayMaker/Actions/AnimateVariables/CurveColor.cs
Executable file
@@ -0,0 +1,109 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Animates the value of a Color Variable FROM-TO with assistance of Deformation Curves.")]
|
||||
public class CurveColor: CurveFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmColor colorVariable;
|
||||
[RequiredField]
|
||||
public FsmColor fromValue;
|
||||
[RequiredField]
|
||||
public FsmColor toValue;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveR;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.Red and toValue.Rec.")]
|
||||
public Calculation calculationR;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveG;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.Green and toValue.Green.")]
|
||||
public Calculation calculationG;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveB;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.Blue and toValue.Blue.")]
|
||||
public Calculation calculationB;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveA;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.Alpha and toValue.Alpha.")]
|
||||
public Calculation calculationA;
|
||||
|
||||
|
||||
Color clr;
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
colorVariable = new FsmColor{UseVariable=true};
|
||||
toValue = new FsmColor{UseVariable=true};
|
||||
fromValue = new FsmColor{UseVariable=true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
finishInNextStep = false;
|
||||
resultFloats = new float[4];
|
||||
fromFloats = new float[4];
|
||||
fromFloats[0] = fromValue.IsNone ? 0f : fromValue.Value.r;
|
||||
fromFloats[1] = fromValue.IsNone ? 0f : fromValue.Value.g;
|
||||
fromFloats[2] = fromValue.IsNone ? 0f : fromValue.Value.b;
|
||||
fromFloats[3] = fromValue.IsNone ? 0f : fromValue.Value.a;
|
||||
toFloats = new float[4];
|
||||
toFloats[0] = toValue.IsNone ? 0f : toValue.Value.r;
|
||||
toFloats[1] = toValue.IsNone ? 0f : toValue.Value.g;
|
||||
toFloats[2] = toValue.IsNone ? 0f : toValue.Value.b;
|
||||
toFloats[3] = toValue.IsNone ? 0f : toValue.Value.a;
|
||||
|
||||
curves = new AnimationCurve[4];
|
||||
curves[0] = curveR.curve;
|
||||
curves[1] = curveG.curve;
|
||||
curves[2] = curveB.curve;
|
||||
curves[3] = curveA.curve;
|
||||
calculations = new Calculation[4];
|
||||
calculations[0] = calculationR;
|
||||
calculations[1] = calculationG;
|
||||
calculations[2] = calculationB;
|
||||
calculations[3] = calculationA;
|
||||
//call Init after you have initialized curves array
|
||||
Init();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
if(!colorVariable.IsNone && isRunning){
|
||||
clr = new Color(resultFloats[0], resultFloats[1], resultFloats[2], resultFloats[3]);
|
||||
colorVariable.Value = clr;
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
if(!looping) {
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!colorVariable.IsNone){
|
||||
clr = new Color(resultFloats[0], resultFloats[1], resultFloats[2], resultFloats[3]);
|
||||
colorVariable.Value = clr;
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/CurveColor.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/CurveColor.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b5ecf704915e1c47a236d3a9e13e1d8
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
79
Assets/PlayMaker/Actions/AnimateVariables/CurveFloat.cs
Executable file
79
Assets/PlayMaker/Actions/AnimateVariables/CurveFloat.cs
Executable file
@@ -0,0 +1,79 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Animates the value of a Float Variable FROM-TO with assistance of Deformation Curve.")]
|
||||
public class CurveFloat: CurveFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat floatVariable;
|
||||
[RequiredField]
|
||||
public FsmFloat fromValue;
|
||||
[RequiredField]
|
||||
public FsmFloat toValue;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve animCurve;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue and toValue.")]
|
||||
public Calculation calculation;
|
||||
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
floatVariable = new FsmFloat{UseVariable=true};
|
||||
toValue = new FsmFloat{UseVariable=true};
|
||||
fromValue = new FsmFloat{UseVariable=true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
finishInNextStep = false;
|
||||
resultFloats = new float[1];
|
||||
fromFloats = new float[1];
|
||||
fromFloats[0] = fromValue.IsNone ? 0f : fromValue.Value;
|
||||
toFloats = new float[1];
|
||||
toFloats[0] = toValue.IsNone ? 0f : toValue.Value;
|
||||
calculations = new Calculation[1];
|
||||
calculations[0] = calculation;
|
||||
curves = new AnimationCurve[1];
|
||||
curves[0] = animCurve.curve;
|
||||
//call Init after you have initialized curves array
|
||||
Init();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
if(!floatVariable.IsNone && isRunning){
|
||||
floatVariable.Value = resultFloats[0];
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
if(!looping) {
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!floatVariable.IsNone){
|
||||
floatVariable.Value = resultFloats[0];
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/CurveFloat.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/CurveFloat.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8df028d2f13f5914482be2a14d98f4b6
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
220
Assets/PlayMaker/Actions/AnimateVariables/CurveFsmAction.cs
Executable file
220
Assets/PlayMaker/Actions/AnimateVariables/CurveFsmAction.cs
Executable file
@@ -0,0 +1,220 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
|
||||
[Tooltip("Animate base action - DON'T USE IT!")]
|
||||
public abstract class CurveFsmAction : FsmStateAction
|
||||
{
|
||||
[Tooltip("Define time to use your curve scaled to be stretched or shrinked.")]
|
||||
public FsmFloat time;
|
||||
[Tooltip("If you define speed, your animation will be speeded up or slowed down.")]
|
||||
public FsmFloat speed;
|
||||
[Tooltip("Delayed animimation start.")]
|
||||
public FsmFloat delay;
|
||||
[Tooltip("Animation curve start from any time. If IgnoreCurveOffset is true the animation starts right after the state become entered.")]
|
||||
public FsmBool ignoreCurveOffset;
|
||||
[Tooltip("Optionally send an Event when the animation finishes.")]
|
||||
public FsmEvent finishEvent;
|
||||
[Tooltip("Ignore TimeScale. Useful if the game is paused.")]
|
||||
public bool realTime;
|
||||
|
||||
private float startTime;
|
||||
private float currentTime;
|
||||
private float[] endTimes;
|
||||
|
||||
private float lastTime;
|
||||
private float deltaTime;
|
||||
private float delayTime;
|
||||
private float[] keyOffsets;
|
||||
|
||||
protected AnimationCurve[] curves;
|
||||
protected Calculation[] calculations;
|
||||
|
||||
protected float[] resultFloats;
|
||||
protected float[] fromFloats;
|
||||
protected float[] toFloats;
|
||||
private float[] distances;
|
||||
|
||||
protected bool finishAction = false;
|
||||
protected bool isRunning;
|
||||
protected bool looping;
|
||||
private bool start = false;
|
||||
private float largestEndTime = 0f;
|
||||
|
||||
public enum Calculation{
|
||||
None,
|
||||
AddToValue,
|
||||
SubtractFromValue,
|
||||
SubtractValueFromCurve,
|
||||
MultiplyValue,
|
||||
DivideValue,
|
||||
DivideCurveByValue,
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
finishEvent = null;
|
||||
realTime = false;
|
||||
time = new FsmFloat { UseVariable = true };
|
||||
speed = new FsmFloat { UseVariable = true };
|
||||
delay = new FsmFloat { UseVariable = true };
|
||||
ignoreCurveOffset = new FsmBool{ Value = true};
|
||||
resultFloats = new float[0];
|
||||
fromFloats = new float[0];
|
||||
toFloats = new float[0];
|
||||
distances = new float[0];
|
||||
endTimes = new float[0];
|
||||
keyOffsets = new float[0];
|
||||
curves = new AnimationCurve[0];
|
||||
finishAction = false;
|
||||
start = false;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
startTime = FsmTime.RealtimeSinceStartup;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
deltaTime = 0f;
|
||||
currentTime = 0f;
|
||||
isRunning = false;
|
||||
finishAction = false;
|
||||
looping = false;
|
||||
delayTime = delay.IsNone ? 0f : delayTime = delay.Value;
|
||||
start = true;
|
||||
}
|
||||
|
||||
protected void Init(){
|
||||
endTimes = new float[curves.Length];
|
||||
keyOffsets = new float[curves.Length];
|
||||
largestEndTime = 0f;
|
||||
for(int i = 0; i<curves.Length;i++){
|
||||
if (curves[i] != null && curves[i].keys.Length > 0)
|
||||
{
|
||||
keyOffsets[i] = curves[i].keys.Length > 0 ? (time.IsNone ? curves[i].keys[0].time : (time.Value/curves[i].keys[curves[i].length-1].time)*curves[i].keys[0].time) : 0f;
|
||||
currentTime = ignoreCurveOffset.IsNone ? 0f : (ignoreCurveOffset.Value ? keyOffsets[i] : 0f);
|
||||
if(!time.IsNone) endTimes[i] = time.Value;
|
||||
else endTimes[i] = curves[i].keys[curves[i].length-1].time;
|
||||
if(largestEndTime < endTimes[i]) largestEndTime = endTimes[i];
|
||||
if(!looping) looping = ActionHelpers.IsLoopingWrapMode(curves[i].postWrapMode);
|
||||
} else {
|
||||
endTimes[i] = -1f;
|
||||
}
|
||||
}
|
||||
for(int i = 0; i<curves.Length;i++){
|
||||
if(largestEndTime > 0f && endTimes[i] == -1f) endTimes[i] = largestEndTime;
|
||||
else {
|
||||
if(largestEndTime == 0f && endTimes[i] == -1f) {
|
||||
if(time.IsNone) endTimes[i] = 1f;
|
||||
else endTimes[i] = time.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
distances = new float[fromFloats.Length];
|
||||
for(int i = 0; i<fromFloats.Length; i++){
|
||||
distances[i] = toFloats[i] - fromFloats[i];
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
// update time
|
||||
if(!isRunning && start){
|
||||
if(delayTime >= 0) {
|
||||
if(realTime){
|
||||
deltaTime = (FsmTime.RealtimeSinceStartup - startTime) - lastTime;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
delayTime -= deltaTime;
|
||||
} else {
|
||||
delayTime -= Time.deltaTime;
|
||||
}
|
||||
} else {
|
||||
isRunning = true;
|
||||
start = false;
|
||||
startTime = FsmTime.RealtimeSinceStartup;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
}
|
||||
}
|
||||
|
||||
if(isRunning && !finishAction){
|
||||
if (realTime)
|
||||
{
|
||||
deltaTime = (FsmTime.RealtimeSinceStartup - startTime) - lastTime;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
|
||||
if(!speed.IsNone) currentTime += deltaTime*speed.Value;
|
||||
else currentTime += deltaTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!speed.IsNone) currentTime += Time.deltaTime*speed.Value;
|
||||
else currentTime += Time.deltaTime;
|
||||
}
|
||||
|
||||
// update animation
|
||||
for(var k = 0; k<curves.Length;k++){
|
||||
if (curves[k] != null && curves[k].keys.Length > 0)
|
||||
{
|
||||
if(calculations[k] != CurveFsmAction.Calculation.None){
|
||||
switch(calculations[k]){
|
||||
case Calculation.AddToValue:
|
||||
if(!time.IsNone) resultFloats[k] = fromFloats[k] + (distances[k]*(currentTime/time.Value) + curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length-1].time));
|
||||
else resultFloats[k] = fromFloats[k] + (distances[k]*(currentTime/endTimes[k]) + curves[k].Evaluate(currentTime));
|
||||
break;
|
||||
case Calculation.SubtractFromValue:
|
||||
if(!time.IsNone) resultFloats[k] = fromFloats[k] + (distances[k]*(currentTime/time.Value) - curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length-1].time));
|
||||
else resultFloats[k] = fromFloats[k] + (distances[k]*(currentTime/endTimes[k]) - curves[k].Evaluate(currentTime));
|
||||
break;
|
||||
case Calculation.SubtractValueFromCurve:
|
||||
if(!time.IsNone) resultFloats[k] = (curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length-1].time) - distances[k]*(currentTime/time.Value)) + fromFloats[k];
|
||||
else resultFloats[k] = (curves[k].Evaluate(currentTime) - distances[k]*(currentTime/endTimes[k])) + fromFloats[k];
|
||||
break;
|
||||
case Calculation.MultiplyValue:
|
||||
if(!time.IsNone) resultFloats[k] = (curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length-1].time) * distances[k]*(currentTime/time.Value)) + fromFloats[k];
|
||||
else resultFloats[k] = (curves[k].Evaluate(currentTime) * distances[k]*(currentTime/endTimes[k])) + fromFloats[k];
|
||||
break;
|
||||
case Calculation.DivideValue :
|
||||
if(!time.IsNone) resultFloats[k] = curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length-1].time) != 0f
|
||||
? fromFloats[k]+ (distances[k]*(currentTime/time.Value))/curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length-1].time) : float.MaxValue;
|
||||
else resultFloats[k] = curves[k].Evaluate(currentTime) != 0
|
||||
? fromFloats[k] + (distances[k]*(currentTime/endTimes[k]))/curves[k].Evaluate(currentTime) : float.MaxValue;
|
||||
break;
|
||||
case Calculation.DivideCurveByValue :
|
||||
if(!time.IsNone) resultFloats[k] = fromFloats[k] != 0f
|
||||
? curves[k].Evaluate((currentTime/time.Value)*curves[k].keys[curves[k].length-1].time)/(distances[k]*(currentTime/time.Value)) + fromFloats[k] : float.MaxValue;
|
||||
else resultFloats[k] = fromFloats[k] != 0
|
||||
? curves[k].Evaluate(currentTime)/(distances[k]*(currentTime/endTimes[k])) + fromFloats[k] : float.MaxValue;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//Linear interpolation between color components
|
||||
if(!time.IsNone) resultFloats[k] = (fromFloats[k] + distances[k]*(currentTime/time.Value));
|
||||
else resultFloats[k] = (fromFloats[k] + distances[k]*(currentTime/endTimes[k]));
|
||||
}
|
||||
} else {
|
||||
if(!time.IsNone) resultFloats[k] = (fromFloats[k] + distances[k]*(currentTime/time.Value));
|
||||
else {
|
||||
if(largestEndTime == 0f){
|
||||
resultFloats[k] = (fromFloats[k] + distances[k]*(currentTime/1f));
|
||||
} else {
|
||||
resultFloats[k] = (fromFloats[k] + distances[k]*(currentTime/largestEndTime));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isRunning) {
|
||||
finishAction = true;
|
||||
for(int i = 0; i<endTimes.Length;i++){
|
||||
//Debug.Log(i.ToString() + "| " +endTimes[i].ToString() + " " + currentTime.ToString());
|
||||
if(currentTime < endTimes[i]) finishAction = false;
|
||||
}
|
||||
isRunning = !finishAction;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/CurveFsmAction.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/CurveFsmAction.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb99e798c2fbc254f96283acdd3cfcf1
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
109
Assets/PlayMaker/Actions/AnimateVariables/CurveRect.cs
Executable file
109
Assets/PlayMaker/Actions/AnimateVariables/CurveRect.cs
Executable file
@@ -0,0 +1,109 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory("AnimateVariables")]
|
||||
[Tooltip("Animates the value of a Rect Variable FROM-TO with assistance of Deformation Curves.")]
|
||||
public class CurveRect: CurveFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmRect rectVariable;
|
||||
[RequiredField]
|
||||
public FsmRect fromValue;
|
||||
[RequiredField]
|
||||
public FsmRect toValue;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveX;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.x and toValue.x.")]
|
||||
public Calculation calculationX;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveY;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.y and toValue.y.")]
|
||||
public Calculation calculationY;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveW;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.width and toValue.width.")]
|
||||
public Calculation calculationW;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveH;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.height and toValue.height.")]
|
||||
public Calculation calculationH;
|
||||
|
||||
|
||||
Rect rct;
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
rectVariable = new FsmRect{UseVariable=true};
|
||||
toValue = new FsmRect{UseVariable=true};
|
||||
fromValue = new FsmRect{UseVariable=true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
finishInNextStep = false;
|
||||
resultFloats = new float[4];
|
||||
fromFloats = new float[4];
|
||||
fromFloats[0] = fromValue.IsNone ? 0f : fromValue.Value.x;
|
||||
fromFloats[1] = fromValue.IsNone ? 0f : fromValue.Value.y;
|
||||
fromFloats[2] = fromValue.IsNone ? 0f : fromValue.Value.width;
|
||||
fromFloats[3] = fromValue.IsNone ? 0f : fromValue.Value.height;
|
||||
toFloats = new float[4];
|
||||
toFloats[0] = toValue.IsNone ? 0f : toValue.Value.x;
|
||||
toFloats[1] = toValue.IsNone ? 0f : toValue.Value.y;
|
||||
toFloats[2] = toValue.IsNone ? 0f : toValue.Value.width;
|
||||
toFloats[3] = toValue.IsNone ? 0f : toValue.Value.height;
|
||||
|
||||
curves = new AnimationCurve[4];
|
||||
curves[0] = curveX.curve;
|
||||
curves[1] = curveY.curve;
|
||||
curves[2] = curveW.curve;
|
||||
curves[3] = curveH.curve;
|
||||
calculations = new Calculation[4];
|
||||
calculations[0] = calculationX;
|
||||
calculations[1] = calculationY;
|
||||
calculations[2] = calculationW;
|
||||
calculations[2] = calculationH;
|
||||
//call Init after you have initialized curves array
|
||||
Init();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
if(!rectVariable.IsNone && isRunning){
|
||||
rct = new Rect(resultFloats[0], resultFloats[1], resultFloats[2], resultFloats[3]);
|
||||
rectVariable.Value = rct;
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
if(!looping) {
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!rectVariable.IsNone){
|
||||
rct = new Rect(resultFloats[0], resultFloats[1], resultFloats[2], resultFloats[3]);
|
||||
rectVariable.Value = rct;
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/CurveRect.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/CurveRect.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea6f61332d0bea74485ff1d0c8e4ce75
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
98
Assets/PlayMaker/Actions/AnimateVariables/CurveVector3.cs
Executable file
98
Assets/PlayMaker/Actions/AnimateVariables/CurveVector3.cs
Executable file
@@ -0,0 +1,98 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Animates the value of a Vector3 Variable FROM-TO with assistance of Deformation Curves.")]
|
||||
public class CurveVector3: CurveFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmVector3 vectorVariable;
|
||||
[RequiredField]
|
||||
public FsmVector3 fromValue;
|
||||
[RequiredField]
|
||||
public FsmVector3 toValue;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveX;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.x and toValue.x.")]
|
||||
public Calculation calculationX;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveY;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.y and toValue.y.")]
|
||||
public Calculation calculationY;
|
||||
[RequiredField]
|
||||
public FsmAnimationCurve curveZ;
|
||||
[Tooltip("Calculation lets you set a type of curve deformation that will be applied to otherwise linear move between fromValue.z and toValue.z.")]
|
||||
public Calculation calculationZ;
|
||||
|
||||
Vector3 vct;
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
vectorVariable = new FsmVector3{UseVariable=true};
|
||||
toValue = new FsmVector3{UseVariable=true};
|
||||
fromValue = new FsmVector3{UseVariable=true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
base.OnEnter();
|
||||
finishInNextStep = false;
|
||||
resultFloats = new float[3];
|
||||
fromFloats = new float[3];
|
||||
fromFloats[0] = fromValue.IsNone ? 0f : fromValue.Value.x;
|
||||
fromFloats[1] = fromValue.IsNone ? 0f : fromValue.Value.y;
|
||||
fromFloats[2] = fromValue.IsNone ? 0f : fromValue.Value.z;
|
||||
toFloats = new float[3];
|
||||
toFloats[0] = toValue.IsNone ? 0f : toValue.Value.x;
|
||||
toFloats[1] = toValue.IsNone ? 0f : toValue.Value.y;
|
||||
toFloats[2] = toValue.IsNone ? 0f : toValue.Value.z;
|
||||
|
||||
curves = new AnimationCurve[3];
|
||||
curves[0] = curveX.curve;
|
||||
curves[1] = curveY.curve;
|
||||
curves[2] = curveZ.curve;
|
||||
calculations = new Calculation[3];
|
||||
calculations[0] = calculationX;
|
||||
calculations[1] = calculationY;
|
||||
calculations[2] = calculationZ;
|
||||
//call Init after you have initialized curves array
|
||||
Init();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
if(!vectorVariable.IsNone && isRunning){
|
||||
vct = new Vector3(resultFloats[0], resultFloats[1], resultFloats[2]);
|
||||
vectorVariable.Value = vct;
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
if(!looping) {
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!vectorVariable.IsNone){
|
||||
vct = new Vector3(resultFloats[0], resultFloats[1], resultFloats[2]);
|
||||
vectorVariable.Value = vct;
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/CurveVector3.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/CurveVector3.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14d5c12ee3042144ea0c7ca086f0ab6f
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
75
Assets/PlayMaker/Actions/AnimateVariables/EaseColor.cs
Executable file
75
Assets/PlayMaker/Actions/AnimateVariables/EaseColor.cs
Executable file
@@ -0,0 +1,75 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Easing Animation - Color")]
|
||||
public class EaseColor : EaseFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
public FsmColor fromValue;
|
||||
[RequiredField]
|
||||
public FsmColor toValue;
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmColor colorVariable;
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset (){
|
||||
base.Reset();
|
||||
colorVariable = null;
|
||||
fromValue = null;
|
||||
toValue = null;
|
||||
finishInNextStep = false;
|
||||
}
|
||||
|
||||
|
||||
public override void OnEnter ()
|
||||
{
|
||||
base.OnEnter();
|
||||
fromFloats = new float[4];
|
||||
fromFloats[0] = fromValue.Value.r;
|
||||
fromFloats[1] = fromValue.Value.g;
|
||||
fromFloats[2] = fromValue.Value.b;
|
||||
fromFloats[3] = fromValue.Value.a;
|
||||
toFloats = new float[4];
|
||||
toFloats[0] = toValue.Value.r;
|
||||
toFloats[1] = toValue.Value.g;
|
||||
toFloats[2] = toValue.Value.b;
|
||||
toFloats[3] = toValue.Value.a;
|
||||
resultFloats = new float[4];
|
||||
finishInNextStep = false;
|
||||
colorVariable.Value = fromValue.Value;
|
||||
}
|
||||
|
||||
public override void OnExit (){
|
||||
base.OnExit();
|
||||
}
|
||||
|
||||
public override void OnUpdate(){
|
||||
base.OnUpdate();
|
||||
if(!colorVariable.IsNone && isRunning){
|
||||
colorVariable.Value = new Color(resultFloats[0],resultFloats[1],resultFloats[2], resultFloats[3]);
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!colorVariable.IsNone){
|
||||
colorVariable.Value = new Color(reverse.IsNone ? toValue.Value.r : reverse.Value ? fromValue.Value.r : toValue.Value.r,
|
||||
reverse.IsNone ? toValue.Value.g : reverse.Value ? fromValue.Value.g : toValue.Value.g,
|
||||
reverse.IsNone ? toValue.Value.b : reverse.Value ? fromValue.Value.b : toValue.Value.b,
|
||||
reverse.IsNone ? toValue.Value.a : reverse.Value ? fromValue.Value.a : toValue.Value.a
|
||||
);
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/EaseColor.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/EaseColor.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dad5426318ed96942a8a501e2635a8c6
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
65
Assets/PlayMaker/Actions/AnimateVariables/EaseFloat.cs
Executable file
65
Assets/PlayMaker/Actions/AnimateVariables/EaseFloat.cs
Executable file
@@ -0,0 +1,65 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Easing Animation - Float")]
|
||||
public class EaseFloat : EaseFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
public FsmFloat fromValue;
|
||||
[RequiredField]
|
||||
public FsmFloat toValue;
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat floatVariable;
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset (){
|
||||
base.Reset();
|
||||
floatVariable = null;
|
||||
fromValue = null;
|
||||
toValue = null;
|
||||
finishInNextStep = false;
|
||||
}
|
||||
|
||||
|
||||
public override void OnEnter ()
|
||||
{
|
||||
base.OnEnter();
|
||||
fromFloats = new float[1];
|
||||
fromFloats[0] = fromValue.Value;
|
||||
toFloats = new float[1];
|
||||
toFloats[0] = toValue.Value;
|
||||
resultFloats = new float[1];
|
||||
finishInNextStep = false;
|
||||
floatVariable.Value = fromValue.Value;
|
||||
}
|
||||
|
||||
public override void OnExit (){
|
||||
base.OnExit();
|
||||
}
|
||||
|
||||
public override void OnUpdate(){
|
||||
base.OnUpdate();
|
||||
if(!floatVariable.IsNone && isRunning){
|
||||
floatVariable.Value = resultFloats[0];
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!floatVariable.IsNone){
|
||||
floatVariable.Value = reverse.IsNone ? toValue.Value : reverse.Value ? fromValue.Value : toValue.Value;
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/EaseFloat.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/EaseFloat.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15e175c518c552040b2203583474c32a
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
529
Assets/PlayMaker/Actions/AnimateVariables/EaseFsmAction.cs
Executable file
529
Assets/PlayMaker/Actions/AnimateVariables/EaseFsmAction.cs
Executable file
@@ -0,0 +1,529 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
/*
|
||||
TERMS OF USE - EASING EQUATIONS
|
||||
Open source under the BSD License.
|
||||
Copyright (c)2001 Robert Penner
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[Tooltip("Ease base action - don't use!")]
|
||||
public abstract class EaseFsmAction : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
public FsmFloat time;
|
||||
public FsmFloat speed;
|
||||
public FsmFloat delay;
|
||||
public EaseType easeType = EaseType.linear;
|
||||
public FsmBool reverse;
|
||||
[Tooltip("Optionally send an Event when the animation finishes.")]
|
||||
public FsmEvent finishEvent;
|
||||
[Tooltip("Ignore TimeScale. Useful if the game is paused.")]
|
||||
public bool realTime;
|
||||
|
||||
protected delegate float EasingFunction(float start, float end, float value);
|
||||
protected EasingFunction ease;
|
||||
protected float runningTime = 0f;
|
||||
protected float lastTime = 0f;
|
||||
protected float startTime = 0f;
|
||||
protected float deltaTime = 0f;
|
||||
protected float delayTime = 0f;
|
||||
protected float percentage = 0f;
|
||||
|
||||
//in descendet class, please set OnEnter or Reset all these arrays to the same length
|
||||
protected float[] fromFloats = new float[0];
|
||||
protected float[] toFloats = new float[0];
|
||||
protected float[] resultFloats = new float[0];
|
||||
|
||||
//set the end point in the descedent class and call Finish() and finishEvent in OnUpdate()
|
||||
protected bool finishAction = false;
|
||||
protected bool start = false;
|
||||
protected bool finished = false;
|
||||
protected bool isRunning = false;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
easeType = EaseType.linear;
|
||||
time = new FsmFloat { Value = 1f };
|
||||
delay = new FsmFloat { UseVariable = true };
|
||||
speed = new FsmFloat { UseVariable = true };
|
||||
reverse = new FsmBool { Value = false };
|
||||
realTime = false;
|
||||
finishEvent = null;
|
||||
ease = null;
|
||||
|
||||
runningTime = 0f;
|
||||
lastTime = 0f;
|
||||
percentage = 0f;
|
||||
|
||||
fromFloats = new float[0];
|
||||
toFloats = new float[0];
|
||||
resultFloats = new float[0];
|
||||
|
||||
finishAction = false;
|
||||
start= false;
|
||||
finished = false;
|
||||
isRunning = false;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
finished = false;
|
||||
isRunning = false;
|
||||
SetEasingFunction();
|
||||
runningTime = 0f;
|
||||
percentage = reverse.IsNone ? 0f : reverse.Value ? 1f : 0f;
|
||||
finishAction = false;
|
||||
startTime = FsmTime.RealtimeSinceStartup;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
delayTime = delay.IsNone ? 0f : delayTime = delay.Value;
|
||||
start = true;
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate(){
|
||||
if(start && !isRunning){
|
||||
if(delayTime >= 0) {
|
||||
if(realTime){
|
||||
deltaTime = (FsmTime.RealtimeSinceStartup - startTime) - lastTime;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
delayTime -= deltaTime;
|
||||
} else {
|
||||
delayTime -= Time.deltaTime;
|
||||
}
|
||||
} else {
|
||||
isRunning = true;
|
||||
start= false;
|
||||
startTime = FsmTime.RealtimeSinceStartup;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
}
|
||||
}
|
||||
|
||||
if(isRunning && !finished){
|
||||
if(!(reverse.IsNone ? false : reverse.Value)){
|
||||
UpdatePercentage();
|
||||
if(percentage<1f){
|
||||
for(int i=0; i<fromFloats.Length; i++){
|
||||
resultFloats[i] = ease(fromFloats[i],toFloats[i],percentage);
|
||||
}
|
||||
}else{
|
||||
finishAction = true;
|
||||
finished = true;
|
||||
isRunning = false;
|
||||
}
|
||||
}else{
|
||||
UpdatePercentage();
|
||||
if(percentage>0f){
|
||||
for(int i=0; i<fromFloats.Length; i++){
|
||||
resultFloats[i] = ease(fromFloats[i],toFloats[i],percentage);
|
||||
}
|
||||
}else{
|
||||
finishAction = true;
|
||||
finished = true;
|
||||
isRunning = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void UpdatePercentage(){
|
||||
|
||||
// Added by PressPlay
|
||||
if (realTime)
|
||||
{
|
||||
deltaTime = (FsmTime.RealtimeSinceStartup - startTime) - lastTime;
|
||||
lastTime = FsmTime.RealtimeSinceStartup - startTime;
|
||||
|
||||
if(!speed.IsNone) runningTime += deltaTime*speed.Value;
|
||||
else runningTime += deltaTime;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!speed.IsNone) runningTime += Time.deltaTime * speed.Value;
|
||||
else runningTime += Time.deltaTime;
|
||||
}
|
||||
|
||||
if(reverse.IsNone ? false : reverse.Value){
|
||||
percentage = 1 - runningTime/time.Value;
|
||||
}else{
|
||||
percentage = runningTime/time.Value;
|
||||
}
|
||||
}
|
||||
|
||||
//instantiates a cached ease equation refrence:
|
||||
protected void SetEasingFunction(){
|
||||
switch (easeType){
|
||||
case EaseType.easeInQuad:
|
||||
ease = new EasingFunction(easeInQuad);
|
||||
break;
|
||||
case EaseType.easeOutQuad:
|
||||
ease = new EasingFunction(easeOutQuad);
|
||||
break;
|
||||
case EaseType.easeInOutQuad:
|
||||
ease = new EasingFunction(easeInOutQuad);
|
||||
break;
|
||||
case EaseType.easeInCubic:
|
||||
ease = new EasingFunction(easeInCubic);
|
||||
break;
|
||||
case EaseType.easeOutCubic:
|
||||
ease = new EasingFunction(easeOutCubic);
|
||||
break;
|
||||
case EaseType.easeInOutCubic:
|
||||
ease = new EasingFunction(easeInOutCubic);
|
||||
break;
|
||||
case EaseType.easeInQuart:
|
||||
ease = new EasingFunction(easeInQuart);
|
||||
break;
|
||||
case EaseType.easeOutQuart:
|
||||
ease = new EasingFunction(easeOutQuart);
|
||||
break;
|
||||
case EaseType.easeInOutQuart:
|
||||
ease = new EasingFunction(easeInOutQuart);
|
||||
break;
|
||||
case EaseType.easeInQuint:
|
||||
ease = new EasingFunction(easeInQuint);
|
||||
break;
|
||||
case EaseType.easeOutQuint:
|
||||
ease = new EasingFunction(easeOutQuint);
|
||||
break;
|
||||
case EaseType.easeInOutQuint:
|
||||
ease = new EasingFunction(easeInOutQuint);
|
||||
break;
|
||||
case EaseType.easeInSine:
|
||||
ease = new EasingFunction(easeInSine);
|
||||
break;
|
||||
case EaseType.easeOutSine:
|
||||
ease = new EasingFunction(easeOutSine);
|
||||
break;
|
||||
case EaseType.easeInOutSine:
|
||||
ease = new EasingFunction(easeInOutSine);
|
||||
break;
|
||||
case EaseType.easeInExpo:
|
||||
ease = new EasingFunction(easeInExpo);
|
||||
break;
|
||||
case EaseType.easeOutExpo:
|
||||
ease = new EasingFunction(easeOutExpo);
|
||||
break;
|
||||
case EaseType.easeInOutExpo:
|
||||
ease = new EasingFunction(easeInOutExpo);
|
||||
break;
|
||||
case EaseType.easeInCirc:
|
||||
ease = new EasingFunction(easeInCirc);
|
||||
break;
|
||||
case EaseType.easeOutCirc:
|
||||
ease = new EasingFunction(easeOutCirc);
|
||||
break;
|
||||
case EaseType.easeInOutCirc:
|
||||
ease = new EasingFunction(easeInOutCirc);
|
||||
break;
|
||||
case EaseType.linear:
|
||||
ease = new EasingFunction(linear);
|
||||
break;
|
||||
case EaseType.spring:
|
||||
ease = new EasingFunction(spring);
|
||||
break;
|
||||
case EaseType.bounce:
|
||||
ease = new EasingFunction(bounce);
|
||||
break;
|
||||
case EaseType.easeInBack:
|
||||
ease = new EasingFunction(easeInBack);
|
||||
break;
|
||||
case EaseType.easeOutBack:
|
||||
ease = new EasingFunction(easeOutBack);
|
||||
break;
|
||||
case EaseType.easeInOutBack:
|
||||
ease = new EasingFunction(easeInOutBack);
|
||||
break;
|
||||
case EaseType.elastic:
|
||||
ease = new EasingFunction(elastic);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#region EaseType
|
||||
public enum EaseType{
|
||||
easeInQuad,
|
||||
easeOutQuad,
|
||||
easeInOutQuad,
|
||||
easeInCubic,
|
||||
easeOutCubic,
|
||||
easeInOutCubic,
|
||||
easeInQuart,
|
||||
easeOutQuart,
|
||||
easeInOutQuart,
|
||||
easeInQuint,
|
||||
easeOutQuint,
|
||||
easeInOutQuint,
|
||||
easeInSine,
|
||||
easeOutSine,
|
||||
easeInOutSine,
|
||||
easeInExpo,
|
||||
easeOutExpo,
|
||||
easeInOutExpo,
|
||||
easeInCirc,
|
||||
easeOutCirc,
|
||||
easeInOutCirc,
|
||||
linear,
|
||||
spring,
|
||||
bounce,
|
||||
easeInBack,
|
||||
easeOutBack,
|
||||
easeInOutBack,
|
||||
elastic,
|
||||
punch
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Easing Curves
|
||||
protected float linear(float start, float end, float value){
|
||||
return Mathf.Lerp(start, end, value);
|
||||
}
|
||||
|
||||
protected float clerp(float start, float end, float value){
|
||||
float min = 0.0f;
|
||||
float max = 360.0f;
|
||||
float half = Mathf.Abs((max - min) / 2.0f);
|
||||
float retval = 0.0f;
|
||||
float diff = 0.0f;
|
||||
if ((end - start) < -half){
|
||||
diff = ((max - start) + end) * value;
|
||||
retval = start + diff;
|
||||
}else if ((end - start) > half){
|
||||
diff = -((max - end) + start) * value;
|
||||
retval = start + diff;
|
||||
}else retval = start + (end - start) * value;
|
||||
return retval;
|
||||
}
|
||||
|
||||
protected float spring(float start, float end, float value){
|
||||
value = Mathf.Clamp01(value);
|
||||
value = (Mathf.Sin(value * Mathf.PI * (0.2f + 2.5f * value * value * value)) * Mathf.Pow(1f - value, 2.2f) + value) * (1f + (1.2f * (1f - value)));
|
||||
return start + (end - start) * value;
|
||||
}
|
||||
|
||||
protected float easeInQuad(float start, float end, float value){
|
||||
end -= start;
|
||||
return end * value * value + start;
|
||||
}
|
||||
|
||||
protected float easeOutQuad(float start, float end, float value){
|
||||
end -= start;
|
||||
return -end * value * (value - 2) + start;
|
||||
}
|
||||
|
||||
protected float easeInOutQuad(float start, float end, float value){
|
||||
value /= .5f;
|
||||
end -= start;
|
||||
if (value < 1) return end / 2 * value * value + start;
|
||||
value--;
|
||||
return -end / 2 * (value * (value - 2) - 1) + start;
|
||||
}
|
||||
|
||||
protected float easeInCubic(float start, float end, float value){
|
||||
end -= start;
|
||||
return end * value * value * value + start;
|
||||
}
|
||||
|
||||
protected float easeOutCubic(float start, float end, float value){
|
||||
value--;
|
||||
end -= start;
|
||||
return end * (value * value * value + 1) + start;
|
||||
}
|
||||
|
||||
protected float easeInOutCubic(float start, float end, float value){
|
||||
value /= .5f;
|
||||
end -= start;
|
||||
if (value < 1) return end / 2 * value * value * value + start;
|
||||
value -= 2;
|
||||
return end / 2 * (value * value * value + 2) + start;
|
||||
}
|
||||
|
||||
protected float easeInQuart(float start, float end, float value){
|
||||
end -= start;
|
||||
return end * value * value * value * value + start;
|
||||
}
|
||||
|
||||
protected float easeOutQuart(float start, float end, float value){
|
||||
value--;
|
||||
end -= start;
|
||||
return -end * (value * value * value * value - 1) + start;
|
||||
}
|
||||
|
||||
protected float easeInOutQuart(float start, float end, float value){
|
||||
value /= .5f;
|
||||
end -= start;
|
||||
if (value < 1) return end / 2 * value * value * value * value + start;
|
||||
value -= 2;
|
||||
return -end / 2 * (value * value * value * value - 2) + start;
|
||||
}
|
||||
|
||||
protected float easeInQuint(float start, float end, float value){
|
||||
end -= start;
|
||||
return end * value * value * value * value * value + start;
|
||||
}
|
||||
|
||||
protected float easeOutQuint(float start, float end, float value){
|
||||
value--;
|
||||
end -= start;
|
||||
return end * (value * value * value * value * value + 1) + start;
|
||||
}
|
||||
|
||||
protected float easeInOutQuint(float start, float end, float value){
|
||||
value /= .5f;
|
||||
end -= start;
|
||||
if (value < 1) return end / 2 * value * value * value * value * value + start;
|
||||
value -= 2;
|
||||
return end / 2 * (value * value * value * value * value + 2) + start;
|
||||
}
|
||||
|
||||
protected float easeInSine(float start, float end, float value){
|
||||
end -= start;
|
||||
return -end * Mathf.Cos(value / 1 * (Mathf.PI / 2)) + end + start;
|
||||
}
|
||||
|
||||
protected float easeOutSine(float start, float end, float value){
|
||||
end -= start;
|
||||
return end * Mathf.Sin(value / 1 * (Mathf.PI / 2)) + start;
|
||||
}
|
||||
|
||||
protected float easeInOutSine(float start, float end, float value){
|
||||
end -= start;
|
||||
return -end / 2 * (Mathf.Cos(Mathf.PI * value / 1) - 1) + start;
|
||||
}
|
||||
|
||||
protected float easeInExpo(float start, float end, float value){
|
||||
end -= start;
|
||||
return end * Mathf.Pow(2, 10 * (value / 1 - 1)) + start;
|
||||
}
|
||||
|
||||
protected float easeOutExpo(float start, float end, float value){
|
||||
end -= start;
|
||||
return end * (-Mathf.Pow(2, -10 * value / 1) + 1) + start;
|
||||
}
|
||||
|
||||
protected float easeInOutExpo(float start, float end, float value){
|
||||
value /= .5f;
|
||||
end -= start;
|
||||
if (value < 1) return end / 2 * Mathf.Pow(2, 10 * (value - 1)) + start;
|
||||
value--;
|
||||
return end / 2 * (-Mathf.Pow(2, -10 * value) + 2) + start;
|
||||
}
|
||||
|
||||
protected float easeInCirc(float start, float end, float value){
|
||||
end -= start;
|
||||
return -end * (Mathf.Sqrt(1 - value * value) - 1) + start;
|
||||
}
|
||||
|
||||
protected float easeOutCirc(float start, float end, float value){
|
||||
value--;
|
||||
end -= start;
|
||||
return end * Mathf.Sqrt(1 - value * value) + start;
|
||||
}
|
||||
|
||||
protected float easeInOutCirc(float start, float end, float value){
|
||||
value /= .5f;
|
||||
end -= start;
|
||||
if (value < 1) return -end / 2 * (Mathf.Sqrt(1 - value * value) - 1) + start;
|
||||
value -= 2;
|
||||
return end / 2 * (Mathf.Sqrt(1 - value * value) + 1) + start;
|
||||
}
|
||||
|
||||
protected float bounce(float start, float end, float value){
|
||||
value /= 1f;
|
||||
end -= start;
|
||||
if (value < (1 / 2.75f)){
|
||||
return end * (7.5625f * value * value) + start;
|
||||
}else if (value < (2 / 2.75f)){
|
||||
value -= (1.5f / 2.75f);
|
||||
return end * (7.5625f * (value) * value + .75f) + start;
|
||||
}else if (value < (2.5 / 2.75)){
|
||||
value -= (2.25f / 2.75f);
|
||||
return end * (7.5625f * (value) * value + .9375f) + start;
|
||||
}else{
|
||||
value -= (2.625f / 2.75f);
|
||||
return end * (7.5625f * (value) * value + .984375f) + start;
|
||||
}
|
||||
}
|
||||
|
||||
protected float easeInBack(float start, float end, float value){
|
||||
end -= start;
|
||||
value /= 1;
|
||||
float s = 1.70158f;
|
||||
return end * (value) * value * ((s + 1) * value - s) + start;
|
||||
}
|
||||
|
||||
protected float easeOutBack(float start, float end, float value){
|
||||
float s = 1.70158f;
|
||||
end -= start;
|
||||
value = (value / 1) - 1;
|
||||
return end * ((value) * value * ((s + 1) * value + s) + 1) + start;
|
||||
}
|
||||
|
||||
protected float easeInOutBack(float start, float end, float value){
|
||||
float s = 1.70158f;
|
||||
end -= start;
|
||||
value /= .5f;
|
||||
if ((value) < 1){
|
||||
s *= (1.525f);
|
||||
return end / 2 * (value * value * (((s) + 1) * value - s)) + start;
|
||||
}
|
||||
value -= 2;
|
||||
s *= (1.525f);
|
||||
return end / 2 * ((value) * value * (((s) + 1) * value + s) + 2) + start;
|
||||
}
|
||||
|
||||
protected float punch(float amplitude, float value){
|
||||
float s = 9;
|
||||
if (value == 0){
|
||||
return 0;
|
||||
}
|
||||
if (value == 1){
|
||||
return 0;
|
||||
}
|
||||
float period = 1 * 0.3f;
|
||||
s = period / (2 * Mathf.PI) * Mathf.Asin(0);
|
||||
return (amplitude * Mathf.Pow(2, -10 * value) * Mathf.Sin((value * 1 - s) * (2 * Mathf.PI) / period));
|
||||
}
|
||||
|
||||
protected float elastic(float start, float end, float value){
|
||||
//Thank you to rafael.marteleto for fixing this as a port over from Pedro's UnityTween
|
||||
end -= start;
|
||||
|
||||
float d = 1f;
|
||||
float p = d * .3f;
|
||||
float s = 0;
|
||||
float a = 0;
|
||||
|
||||
if (value == 0) return start;
|
||||
|
||||
if ((value /= d) == 1) return start + end;
|
||||
|
||||
if (a == 0f || a < Mathf.Abs(end)){
|
||||
a = end;
|
||||
s = p / 4;
|
||||
}else{
|
||||
s = p / (2 * Mathf.PI) * Mathf.Asin(end / a);
|
||||
}
|
||||
|
||||
return (a * Mathf.Pow(2, -10 * value) * Mathf.Sin((value * d - s) * (2 * Mathf.PI) / p) + end + start);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/EaseFsmAction.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/EaseFsmAction.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 652d636e5afe3ee4ebe97f2b8a6db58f
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
75
Assets/PlayMaker/Actions/AnimateVariables/EaseRect.cs
Executable file
75
Assets/PlayMaker/Actions/AnimateVariables/EaseRect.cs
Executable file
@@ -0,0 +1,75 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory("AnimateVariables")]
|
||||
[Tooltip("Easing Animation - Rect.")]
|
||||
public class EaseRect : EaseFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
public FsmRect fromValue;
|
||||
[RequiredField]
|
||||
public FsmRect toValue;
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmRect rectVariable;
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset (){
|
||||
base.Reset();
|
||||
rectVariable = null;
|
||||
fromValue = null;
|
||||
toValue = null;
|
||||
finishInNextStep = false;
|
||||
}
|
||||
|
||||
|
||||
public override void OnEnter ()
|
||||
{
|
||||
base.OnEnter();
|
||||
fromFloats = new float[4];
|
||||
fromFloats[0] = fromValue.Value.x;
|
||||
fromFloats[1] = fromValue.Value.y;
|
||||
fromFloats[2] = fromValue.Value.width;
|
||||
fromFloats[3] = fromValue.Value.height;
|
||||
toFloats = new float[4];
|
||||
toFloats[0] = toValue.Value.x;
|
||||
toFloats[1] = toValue.Value.y;
|
||||
toFloats[2] = toValue.Value.width;
|
||||
toFloats[3] = toValue.Value.height;
|
||||
resultFloats = new float[4];
|
||||
finishInNextStep = false;
|
||||
rectVariable.Value = fromValue.Value;
|
||||
}
|
||||
|
||||
public override void OnExit (){
|
||||
base.OnExit();
|
||||
}
|
||||
|
||||
public override void OnUpdate(){
|
||||
base.OnUpdate();
|
||||
if(!rectVariable.IsNone && isRunning){
|
||||
rectVariable.Value = new Rect(resultFloats[0],resultFloats[1],resultFloats[2], resultFloats[3]);
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!rectVariable.IsNone){
|
||||
rectVariable.Value = new Rect(reverse.IsNone ? toValue.Value.x : reverse.Value ? fromValue.Value.x : toValue.Value.x,
|
||||
reverse.IsNone ? toValue.Value.y : reverse.Value ? fromValue.Value.y : toValue.Value.y,
|
||||
reverse.IsNone ? toValue.Value.width : reverse.Value ? fromValue.Value.width : toValue.Value.width,
|
||||
reverse.IsNone ? toValue.Value.height : reverse.Value ? fromValue.Value.height : toValue.Value.height
|
||||
);
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/EaseRect.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/EaseRect.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c7149467973e052458a62dbd4dbc91c1
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
72
Assets/PlayMaker/Actions/AnimateVariables/EaseVector3.cs
Executable file
72
Assets/PlayMaker/Actions/AnimateVariables/EaseVector3.cs
Executable file
@@ -0,0 +1,72 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.AnimateVariables)]
|
||||
[Tooltip("Easing Animation - Vector3")]
|
||||
public class EaseVector3 : EaseFsmAction
|
||||
{
|
||||
[RequiredField]
|
||||
public FsmVector3 fromValue;
|
||||
[RequiredField]
|
||||
public FsmVector3 toValue;
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmVector3 vector3Variable;
|
||||
|
||||
private bool finishInNextStep = false;
|
||||
|
||||
public override void Reset (){
|
||||
base.Reset();
|
||||
vector3Variable = null;
|
||||
fromValue = null;
|
||||
toValue = null;
|
||||
finishInNextStep = false;
|
||||
}
|
||||
|
||||
|
||||
public override void OnEnter ()
|
||||
{
|
||||
base.OnEnter();
|
||||
fromFloats = new float[3];
|
||||
fromFloats[0] = fromValue.Value.x;
|
||||
fromFloats[1] = fromValue.Value.y;
|
||||
fromFloats[2] = fromValue.Value.z;
|
||||
toFloats = new float[3];
|
||||
toFloats[0] = toValue.Value.x;
|
||||
toFloats[1] = toValue.Value.y;
|
||||
toFloats[2] = toValue.Value.z;
|
||||
resultFloats = new float[3];
|
||||
finishInNextStep = false;
|
||||
vector3Variable.Value = fromValue.Value;
|
||||
}
|
||||
|
||||
public override void OnExit (){
|
||||
base.OnExit();
|
||||
}
|
||||
|
||||
public override void OnUpdate(){
|
||||
base.OnUpdate();
|
||||
if(!vector3Variable.IsNone && isRunning){
|
||||
vector3Variable.Value = new Vector3(resultFloats[0],resultFloats[1],resultFloats[2]);
|
||||
}
|
||||
|
||||
if(finishInNextStep){
|
||||
Finish();
|
||||
if(finishEvent != null) Fsm.Event(finishEvent);
|
||||
}
|
||||
|
||||
if(finishAction && !finishInNextStep){
|
||||
if(!vector3Variable.IsNone){
|
||||
vector3Variable.Value = new Vector3(reverse.IsNone ? toValue.Value.x : reverse.Value ? fromValue.Value.x : toValue.Value.x,
|
||||
reverse.IsNone ? toValue.Value.y : reverse.Value ? fromValue.Value.y : toValue.Value.y,
|
||||
reverse.IsNone ? toValue.Value.z : reverse.Value ? fromValue.Value.z : toValue.Value.z
|
||||
);
|
||||
}
|
||||
finishInNextStep = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimateVariables/EaseVector3.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimateVariables/EaseVector3.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94f53459012912c41aaa91782fd12bb1
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
88
Assets/PlayMaker/Actions/AnimationSettings.cs
Executable file
88
Assets/PlayMaker/Actions/AnimationSettings.cs
Executable file
@@ -0,0 +1,88 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Animation)]
|
||||
[Tooltip("Set the Wrap Mode, Blend Mode, Layer and Speed of an Animation.\nNOTE: Settings are applied once, on entering the state, NOT continuously. To dynamically control an animation's settings, use Set Animation Speede etc.")]
|
||||
public class AnimationSettings : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(Animation))]
|
||||
[Tooltip("A GameObject with an Animation Component.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Animation)]
|
||||
[Tooltip("The name of the animation.")]
|
||||
public FsmString animName;
|
||||
|
||||
[Tooltip("The behavior of the animation when it wraps.")]
|
||||
public WrapMode wrapMode;
|
||||
|
||||
[Tooltip("How the animation is blended with other animations on the Game Object.")]
|
||||
public AnimationBlendMode blendMode;
|
||||
|
||||
[HasFloatSlider(0f, 5f)]
|
||||
[Tooltip("The speed of the animation. 1 = normal; 2 = double speed...")]
|
||||
public FsmFloat speed;
|
||||
|
||||
[Tooltip("The animation layer")]
|
||||
public FsmInt layer;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
gameObject = null;
|
||||
animName = null;
|
||||
wrapMode = WrapMode.Loop;
|
||||
blendMode = AnimationBlendMode.Blend;
|
||||
speed = 1.0f;
|
||||
layer = 0;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAnimationSettings();
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
void DoAnimationSettings()
|
||||
{
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if (go == null || string.IsNullOrEmpty(animName.Value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var animation = go.GetComponent<Animation>();
|
||||
if (animation == null)
|
||||
{
|
||||
LogWarning("Missing animation component: " + go.name);
|
||||
return;
|
||||
}
|
||||
|
||||
var anim = animation[animName.Value];
|
||||
|
||||
if (anim == null)
|
||||
{
|
||||
LogWarning("Missing animation: " + animName.Value);
|
||||
return;
|
||||
}
|
||||
|
||||
anim.wrapMode = wrapMode;
|
||||
anim.blendMode = blendMode;
|
||||
|
||||
if (!layer.IsNone)
|
||||
{
|
||||
anim.layer = layer.Value;
|
||||
}
|
||||
|
||||
if (!speed.IsNone)
|
||||
{
|
||||
anim.speed = speed.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnimationSettings.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnimationSettings.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6f1da104999d6b144b9e1d7cff19f8e9
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
28
Assets/PlayMaker/Actions/AnyKey.cs
Executable file
28
Assets/PlayMaker/Actions/AnyKey.cs
Executable file
@@ -0,0 +1,28 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Input)]
|
||||
[Tooltip("Sends an Event when the user hits any Key or Mouse Button.")]
|
||||
public class AnyKey : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[Tooltip("Event to send when any Key or Mouse Button is pressed.")]
|
||||
public FsmEvent sendEvent;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
sendEvent = null;
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
if (Input.anyKeyDown)
|
||||
{
|
||||
Fsm.Event(sendEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/AnyKey.cs.meta
Executable file
8
Assets/PlayMaker/Actions/AnyKey.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e2ceb38715ac154487295adaabfd5df
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
22
Assets/PlayMaker/Actions/ApplicationQuit.cs
Executable file
22
Assets/PlayMaker/Actions/ApplicationQuit.cs
Executable file
@@ -0,0 +1,22 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Application)]
|
||||
[Tooltip("Quits the player application.")]
|
||||
public class ApplicationQuit : FsmStateAction
|
||||
{
|
||||
public override void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
Application.Quit();
|
||||
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/ApplicationQuit.cs.meta
Executable file
8
Assets/PlayMaker/Actions/ApplicationQuit.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ace578551a64364db33bcd3c420797c
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
25
Assets/PlayMaker/Actions/ApplicationRunInBackground.cs
Executable file
25
Assets/PlayMaker/Actions/ApplicationRunInBackground.cs
Executable file
@@ -0,0 +1,25 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Application)]
|
||||
[Tooltip("Sets if the Application should play in the background. Useful for servers or testing network games on one machine.")]
|
||||
public class ApplicationRunInBackground : FsmStateAction
|
||||
{
|
||||
public FsmBool runInBackground;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
runInBackground = true;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
Application.runInBackground = runInBackground.Value;
|
||||
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/ApplicationRunInBackground.cs.meta
Executable file
8
Assets/PlayMaker/Actions/ApplicationRunInBackground.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8acf39900e9db9543aa415136960f581
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
9
Assets/PlayMaker/Actions/Array.meta
Normal file
9
Assets/PlayMaker/Actions/Array.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04140375cc92843f89e3418a5e189648
|
||||
folderAsset: yes
|
||||
timeCreated: 1449957901
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
43
Assets/PlayMaker/Actions/Array/ArrayAdd.cs
Executable file
43
Assets/PlayMaker/Actions/Array/ArrayAdd.cs
Executable file
@@ -0,0 +1,43 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Add an item to the end of an Array.")]
|
||||
public class ArrayAdd : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array Variable to use.")]
|
||||
public FsmArray array;
|
||||
|
||||
[RequiredField]
|
||||
[MatchElementType("array")]
|
||||
[Tooltip("Item to add.")]
|
||||
public FsmVar value;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
value = null;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddValue();
|
||||
Finish();
|
||||
}
|
||||
|
||||
private void DoAddValue()
|
||||
{
|
||||
array.Resize(array.Length + 1);
|
||||
value.UpdateValue();
|
||||
array.Set(array.Length - 1, value.GetValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayAdd.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayAdd.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cf434aed56dd6b4eb839ed214ff0af5
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
53
Assets/PlayMaker/Actions/Array/ArrayAddRange.cs
Executable file
53
Assets/PlayMaker/Actions/Array/ArrayAddRange.cs
Executable file
@@ -0,0 +1,53 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Add values to an array.")]
|
||||
public class ArrayAddRange : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array Variable to use.")]
|
||||
public FsmArray array;
|
||||
|
||||
[RequiredField]
|
||||
[MatchElementType("array")]
|
||||
[Tooltip("The variables to add.")]
|
||||
public FsmVar[] variables;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
variables = new FsmVar[2];
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoAddRange();
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
private void DoAddRange()
|
||||
{
|
||||
int count = variables.Length;
|
||||
|
||||
if (count>0)
|
||||
{
|
||||
array.Resize(array.Length+count);
|
||||
|
||||
foreach(FsmVar _var in variables)
|
||||
{
|
||||
array.Set(array.Length-count,_var.GetValue());
|
||||
count--;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayAddRange.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayAddRange.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0921aaea4fadc8b498ea50142d26b83e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
43
Assets/PlayMaker/Actions/Array/ArrayClear.cs
Executable file
43
Assets/PlayMaker/Actions/Array/ArrayClear.cs
Executable file
@@ -0,0 +1,43 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Sets all items in an Array to their default value: 0, empty string, false, or null depending on their type. Optionally defines a reset value to use.")]
|
||||
public class ArrayClear : FsmStateAction
|
||||
{
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array Variable to clear.")]
|
||||
public FsmArray array;
|
||||
|
||||
[MatchElementType("array")]
|
||||
[Tooltip("Optional reset value. Leave as None for default value.")]
|
||||
public FsmVar resetValue;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
resetValue = new FsmVar() {useVariable = true};
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
int count = array.Length;
|
||||
|
||||
array.Reset();
|
||||
array.Resize(count);
|
||||
|
||||
if (!resetValue.IsNone)
|
||||
{
|
||||
object _val = resetValue.GetValue();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array.Set(i, _val);
|
||||
}
|
||||
}
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayClear.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayClear.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7235925ce776e34b88138a187d39dc7
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
77
Assets/PlayMaker/Actions/Array/ArrayContains.cs
Executable file
77
Assets/PlayMaker/Actions/Array/ArrayContains.cs
Executable file
@@ -0,0 +1,77 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Check if an Array contains a value. Optionally get its index.")]
|
||||
public class ArrayContains : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array Variable to use.")]
|
||||
public FsmArray array;
|
||||
|
||||
[RequiredField]
|
||||
[MatchElementType("array")]
|
||||
[Tooltip("The value to check against in the array.")]
|
||||
public FsmVar value;
|
||||
|
||||
[ActionSection("Result")]
|
||||
|
||||
[Tooltip("The index of the value in the array.")]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmInt index;
|
||||
|
||||
[Tooltip("Store in a bool wether it contains or not that element (described below)")]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmBool isContained;
|
||||
|
||||
[Tooltip("Event sent if this arraList contains that element ( described below)")]
|
||||
[UIHint(UIHint.FsmEvent)]
|
||||
public FsmEvent isContainedEvent;
|
||||
|
||||
[Tooltip("Event sent if this arraList does not contains that element ( described below)")]
|
||||
[UIHint(UIHint.FsmEvent)]
|
||||
public FsmEvent isNotContainedEvent;
|
||||
|
||||
public override void Reset ()
|
||||
{
|
||||
array = null;
|
||||
value = null;
|
||||
|
||||
index = null;
|
||||
|
||||
isContained = null;
|
||||
isContainedEvent = null;
|
||||
isNotContainedEvent = null;
|
||||
}
|
||||
|
||||
// Code that runs on entering the state.
|
||||
public override void OnEnter ()
|
||||
{
|
||||
DoCheckContainsValue ();
|
||||
Finish ();
|
||||
}
|
||||
|
||||
private void DoCheckContainsValue()
|
||||
{
|
||||
value.UpdateValue();
|
||||
var _id = Array.IndexOf(array.Values, value.GetValue());
|
||||
|
||||
var _iscontained = _id != -1;
|
||||
isContained.Value = _iscontained;
|
||||
index.Value = _id;
|
||||
if (_iscontained)
|
||||
{
|
||||
Fsm.Event(isContainedEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
Fsm.Event(isNotContainedEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayContains.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayContains.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f93a56f20084a2446a06a44bc27e257c
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
71
Assets/PlayMaker/Actions/Array/ArrayDeleteAt.cs
Executable file
71
Assets/PlayMaker/Actions/Array/ArrayDeleteAt.cs
Executable file
@@ -0,0 +1,71 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Delete the item at an index. Index must be between 0 and the number of items -1. First item is index 0.")]
|
||||
public class ArrayDeleteAt : FsmStateAction
|
||||
{
|
||||
[RequiredField] [UIHint(UIHint.Variable)] [Tooltip("The Array Variable to use.")] public FsmArray array;
|
||||
|
||||
[Tooltip("The index into the array.")] public FsmInt index;
|
||||
|
||||
[ActionSection("Result")] [UIHint(UIHint.FsmEvent)] [Tooltip("The event to trigger if the index is out of range")] public FsmEvent indexOutOfRangeEvent;
|
||||
|
||||
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
index = null;
|
||||
indexOutOfRangeEvent = null;
|
||||
}
|
||||
|
||||
|
||||
// Code that runs on entering the state.
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoDeleteAt();
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
private void DoDeleteAt()
|
||||
{
|
||||
if (index.Value >= 0 && index.Value < array.Length)
|
||||
{
|
||||
List<object> _list = new List<object>(array.Values);
|
||||
_list.RemoveAt(index.Value);
|
||||
array.Values = _list.ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
Fsm.Event(indexOutOfRangeEvent);
|
||||
}
|
||||
}
|
||||
|
||||
/* Not sure it's a good idea to check range at edit time since it can change at runtime
|
||||
public override string ErrorCheck()
|
||||
{
|
||||
if (array.Length==0)
|
||||
{
|
||||
if (index.Value<0)
|
||||
{
|
||||
return "Index out of Range. Please select a positive number. First item is index 0.";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
if (index.Value<0 || index.Value >= array.Length)
|
||||
{
|
||||
return "Index out of Range. Please select an index between 0 and the number of items -1. First item is index 0.";
|
||||
}
|
||||
return "";
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayDeleteAt.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayDeleteAt.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc32998bfef18a347a974d0482c14ae9
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
138
Assets/PlayMaker/Actions/Array/ArrayForEach.cs
Executable file
138
Assets/PlayMaker/Actions/Array/ArrayForEach.cs
Executable file
@@ -0,0 +1,138 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using HutongGames.PlayMaker;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Iterate through the items in an Array and run an FSM on each item. NOTE: The FSM has to Finish before being run on the next item.")]
|
||||
public class ArrayForEach : RunFSMAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("Array to iterate through.")]
|
||||
public FsmArray array;
|
||||
|
||||
[HideTypeFilter]
|
||||
[MatchElementType("array")]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("Store the item in a variable")]
|
||||
public FsmVar storeItem;
|
||||
|
||||
[ActionSection("Run FSM")]
|
||||
|
||||
public FsmTemplateControl fsmTemplateControl = new FsmTemplateControl();
|
||||
|
||||
[Tooltip("Event to send after iterating through all items in the Array.")]
|
||||
public FsmEvent finishEvent;
|
||||
|
||||
private int currentIndex;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
fsmTemplateControl = new FsmTemplateControl();
|
||||
runFsm = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize FSM on awake so it doesn't cause hitches later
|
||||
/// </summary>
|
||||
public override void Awake()
|
||||
{
|
||||
if (array != null && fsmTemplateControl.fsmTemplate != null && Application.isPlaying)
|
||||
{
|
||||
runFsm = Fsm.CreateSubFsm(fsmTemplateControl);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
if (array == null || runFsm == null)
|
||||
{
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
|
||||
currentIndex = 0;
|
||||
StartFsm();
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
runFsm.Update();
|
||||
if (!runFsm.Finished)
|
||||
{
|
||||
return; // continue later
|
||||
}
|
||||
|
||||
StartNextFsm();
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate()
|
||||
{
|
||||
runFsm.LateUpdate();
|
||||
if (!runFsm.Finished)
|
||||
{
|
||||
return; // continue later
|
||||
}
|
||||
|
||||
StartNextFsm();
|
||||
}
|
||||
|
||||
public override void OnLateUpdate()
|
||||
{
|
||||
runFsm.LateUpdate();
|
||||
if (!runFsm.Finished)
|
||||
{
|
||||
return; // continue later
|
||||
}
|
||||
|
||||
StartNextFsm();
|
||||
}
|
||||
|
||||
void StartNextFsm()
|
||||
{
|
||||
currentIndex++;
|
||||
StartFsm();
|
||||
}
|
||||
|
||||
void StartFsm()
|
||||
{
|
||||
while (currentIndex < array.Length)
|
||||
{
|
||||
DoStartFsm();
|
||||
if (!runFsm.Finished)
|
||||
{
|
||||
return; // continue later
|
||||
}
|
||||
currentIndex++;
|
||||
}
|
||||
|
||||
Fsm.Event(finishEvent);
|
||||
Finish();
|
||||
}
|
||||
|
||||
void DoStartFsm()
|
||||
{
|
||||
storeItem.SetValue(array.Values[currentIndex]);
|
||||
|
||||
fsmTemplateControl.UpdateValues();
|
||||
fsmTemplateControl.ApplyOverrides(runFsm);
|
||||
|
||||
runFsm.OnEnable();
|
||||
|
||||
if (!runFsm.Started)
|
||||
{
|
||||
runFsm.Start();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CheckIfFinished()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayForEach.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayForEach.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8a2a6d82cdbdad4a8178dd12b02dee0
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
95
Assets/PlayMaker/Actions/Array/ArrayGet.cs
Executable file
95
Assets/PlayMaker/Actions/Array/ArrayGet.cs
Executable file
@@ -0,0 +1,95 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Get a value at an index. Index must be between 0 and the number of items -1. First item is index 0.")]
|
||||
public class ArrayGet : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array Variable to use.")]
|
||||
public FsmArray array;
|
||||
|
||||
[Tooltip("The index into the array.")]
|
||||
public FsmInt index;
|
||||
|
||||
[RequiredField]
|
||||
[MatchElementType("array")]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("Store the value in a variable.")]
|
||||
public FsmVar storeValue;
|
||||
|
||||
[Tooltip("Repeat every frame while the state is active.")]
|
||||
public bool everyFrame;
|
||||
|
||||
[ActionSection("Events")]
|
||||
|
||||
[UIHint(UIHint.FsmEvent)]
|
||||
[Tooltip("The event to trigger if the index is out of range")]
|
||||
public FsmEvent indexOutOfRange;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
index = null;
|
||||
everyFrame = false;
|
||||
storeValue = null;
|
||||
indexOutOfRange = null;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoGetValue();
|
||||
|
||||
if (!everyFrame)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
DoGetValue();
|
||||
|
||||
}
|
||||
|
||||
private void DoGetValue()
|
||||
{
|
||||
if (array.IsNone || storeValue.IsNone)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (index.Value >= 0 && index.Value < array.Length)
|
||||
{
|
||||
storeValue.SetValue(array.Get(index.Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
//LogError("Index out of Range: " + index.Value);
|
||||
Fsm.Event(indexOutOfRange);
|
||||
}
|
||||
}
|
||||
|
||||
/* Not sure it's a good idea to range check at edit time since it can change at runtime
|
||||
public override string ErrorCheck()
|
||||
{
|
||||
if (index.Value<0 || index.Value >= array.Length)
|
||||
{
|
||||
return "Index out of Range. Please select an index between 0 and the number of items -1. First item is index 0.";
|
||||
}
|
||||
return "";
|
||||
}*/
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public override string AutoName()
|
||||
{
|
||||
return ActionHelpers.GetValueLabel(storeValue.NamedVar) + "=" + array.Name + "[" + ActionHelpers.GetValueLabel(index) + "]";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayGet.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayGet.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb2087d662074974ba5d95f6f6443889
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
118
Assets/PlayMaker/Actions/Array/ArrayGetNext.cs
Executable file
118
Assets/PlayMaker/Actions/Array/ArrayGetNext.cs
Executable file
@@ -0,0 +1,118 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Each time this action is called it gets the next item from a Array. \n" +
|
||||
"This lets you quickly loop through all the items of an array to perform actions on them.")]
|
||||
public class ArrayGetNext : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array Variable to use.")]
|
||||
public FsmArray array;
|
||||
|
||||
[Tooltip("From where to start iteration, leave as 0 to start from the beginning")]
|
||||
public FsmInt startIndex;
|
||||
|
||||
[Tooltip("When to end iteration, leave as 0 to iterate until the end")]
|
||||
public FsmInt endIndex;
|
||||
|
||||
[Tooltip("Event to send to get the next item.")]
|
||||
public FsmEvent loopEvent;
|
||||
|
||||
[Tooltip("Event to send when there are no more items.")]
|
||||
public FsmEvent finishedEvent;
|
||||
|
||||
[ActionSection("Result")]
|
||||
|
||||
[MatchElementType("array")]
|
||||
public FsmVar result;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmInt currentIndex;
|
||||
|
||||
// increment that index as we loop through item
|
||||
private int nextItemIndex = 0;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
startIndex = null;
|
||||
endIndex = null;
|
||||
|
||||
currentIndex = null;
|
||||
|
||||
loopEvent = null;
|
||||
finishedEvent = null;
|
||||
|
||||
result = null;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
if (nextItemIndex == 0)
|
||||
{
|
||||
if (startIndex.Value>0)
|
||||
{
|
||||
nextItemIndex = startIndex.Value;
|
||||
}
|
||||
}
|
||||
|
||||
DoGetNextItem();
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
|
||||
void DoGetNextItem()
|
||||
{
|
||||
// no more children?
|
||||
// check first to avoid errors.
|
||||
|
||||
if (nextItemIndex >= array.Length)
|
||||
{
|
||||
nextItemIndex = 0;
|
||||
currentIndex.Value = array.Length -1;
|
||||
Fsm.Event(finishedEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
// get next item
|
||||
|
||||
result.SetValue(array.Get(nextItemIndex));
|
||||
|
||||
// no more items?
|
||||
// check a second time to avoid process lock and possible infinite loop if the action is called again.
|
||||
// Practically, this enabled calling again this state and it will start again iterating from the first child.
|
||||
|
||||
if (nextItemIndex >= array.Length)
|
||||
{
|
||||
nextItemIndex = 0;
|
||||
currentIndex.Value = array.Length-1;
|
||||
Fsm.Event(finishedEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
if (endIndex.Value>0 && nextItemIndex>= endIndex.Value)
|
||||
{
|
||||
nextItemIndex = 0;
|
||||
currentIndex.Value = endIndex.Value;
|
||||
Fsm.Event(finishedEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
// iterate the next child
|
||||
nextItemIndex++;
|
||||
|
||||
currentIndex.Value = nextItemIndex -1 ;
|
||||
|
||||
if (loopEvent != null)
|
||||
{
|
||||
Fsm.Event(loopEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayGetNext.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayGetNext.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f2c332853b32c743940b57c0a595ed7
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
63
Assets/PlayMaker/Actions/Array/ArrayGetRandom.cs
Executable file
63
Assets/PlayMaker/Actions/Array/ArrayGetRandom.cs
Executable file
@@ -0,0 +1,63 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Get a Random item from an Array.")]
|
||||
public class ArrayGetRandom : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array to use.")]
|
||||
public FsmArray array;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("Store the value in a variable.")]
|
||||
[MatchElementType("array")]
|
||||
public FsmVar storeValue;
|
||||
|
||||
[Tooltip("Repeat every frame while the state is active.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
storeValue =null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
// Code that runs on entering the state.
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoGetRandomValue();
|
||||
|
||||
if (!everyFrame)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
DoGetRandomValue();
|
||||
|
||||
}
|
||||
|
||||
private void DoGetRandomValue()
|
||||
{
|
||||
if (storeValue.IsNone)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
storeValue.SetValue(array.Get(Random.Range(0,array.Length)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayGetRandom.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayGetRandom.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df9a5befe0eda4445a018b47d17c2a8b
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
44
Assets/PlayMaker/Actions/Array/ArrayLength.cs
Executable file
44
Assets/PlayMaker/Actions/Array/ArrayLength.cs
Executable file
@@ -0,0 +1,44 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Gets the number of items in an Array.")]
|
||||
public class ArrayLength : FsmStateAction
|
||||
{
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array Variable.")]
|
||||
public FsmArray array;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("Store the length in an Int Variable.")]
|
||||
public FsmInt length;
|
||||
|
||||
[Tooltip("Repeat every frame. Useful if the array is changing and you're waiting for a particular length.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
length = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
length.Value = array.Length;
|
||||
|
||||
if (!everyFrame)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
length.Value = array.Length;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayLength.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayLength.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bdba2552ffbbbc74b9d67cb2b54e1324
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
44
Assets/PlayMaker/Actions/Array/ArrayResize.cs
Executable file
44
Assets/PlayMaker/Actions/Array/ArrayResize.cs
Executable file
@@ -0,0 +1,44 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Resize an array.")]
|
||||
public class ArrayResize : FsmStateAction
|
||||
{
|
||||
[RequiredField] [UIHint(UIHint.Variable)] [Tooltip("The Array Variable to resize")] public FsmArray array;
|
||||
|
||||
[Tooltip("The new size of the array.")] public FsmInt newSize;
|
||||
|
||||
[UIHint(UIHint.FsmEvent)] [Tooltip("The event to trigger if the new size is out of range")] public FsmEvent
|
||||
sizeOutOfRangeEvent;
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
if (newSize.Value >= 0)
|
||||
{
|
||||
array.Resize(newSize.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogError("Size out of range: " + newSize.Value);
|
||||
Fsm.Event(sizeOutOfRangeEvent);
|
||||
}
|
||||
|
||||
Finish();
|
||||
}
|
||||
|
||||
/* Should be disallowed by the UI now
|
||||
public override string ErrorCheck()
|
||||
{
|
||||
if (newSize.Value<0)
|
||||
{
|
||||
return "newSize must be a positive value.";
|
||||
}
|
||||
return "";
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayResize.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayResize.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68e5e954eb95b7b40b0e00f59b4d1986
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
33
Assets/PlayMaker/Actions/Array/ArrayReverse.cs
Executable file
33
Assets/PlayMaker/Actions/Array/ArrayReverse.cs
Executable file
@@ -0,0 +1,33 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Reverse the order of items in an Array.")]
|
||||
public class ArrayReverse : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array to reverse.")]
|
||||
public FsmArray array;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
}
|
||||
|
||||
// Code that runs on entering the state.
|
||||
public override void OnEnter()
|
||||
{
|
||||
var _list = new List<object>(array.Values);
|
||||
_list.Reverse();
|
||||
array.Values = _list.ToArray();
|
||||
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArrayReverse.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArrayReverse.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41e56ac32e995724a9ea51f5b7b5ebce
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
87
Assets/PlayMaker/Actions/Array/ArraySet.cs
Executable file
87
Assets/PlayMaker/Actions/Array/ArraySet.cs
Executable file
@@ -0,0 +1,87 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Set the value at an index. Index must be between 0 and the number of items -1. First item is index 0.")]
|
||||
public class ArraySet : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array Variable to use.")]
|
||||
public FsmArray array;
|
||||
|
||||
[Tooltip("The index into the array.")]
|
||||
public FsmInt index;
|
||||
|
||||
[RequiredField]
|
||||
[MatchElementType("array")]
|
||||
[Tooltip("Set the value of the array at the specified index.")]
|
||||
public FsmVar value;
|
||||
|
||||
[Tooltip("Repeat every frame while the state is active.")]
|
||||
public bool everyFrame;
|
||||
|
||||
[ActionSection("Events")]
|
||||
|
||||
[UIHint(UIHint.FsmEvent)]
|
||||
[Tooltip("The event to trigger if the index is out of range")]
|
||||
public FsmEvent indexOutOfRange;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
index = null;
|
||||
value = null;
|
||||
everyFrame = false;
|
||||
indexOutOfRange = null;
|
||||
}
|
||||
|
||||
public override void OnEnter()
|
||||
{
|
||||
DoGetValue();
|
||||
|
||||
if (!everyFrame)
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
DoGetValue();
|
||||
}
|
||||
|
||||
private void DoGetValue()
|
||||
{
|
||||
if (array.IsNone)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (index.Value >= 0 && index.Value < array.Length)
|
||||
{
|
||||
value.UpdateValue();
|
||||
array.Set(index.Value, value.GetValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
//LogError("Index out of Range: " + index.Value);
|
||||
Fsm.Event(indexOutOfRange);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public override string ErrorCheck()
|
||||
{
|
||||
if (index.Value<0 || index.Value >= array.Length)
|
||||
{
|
||||
return "Index out of Range. Please select an index between 0 and the number of items -1. First item is index 0.";
|
||||
}
|
||||
return "";
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/PlayMaker/Actions/Array/ArraySet.cs.meta
Executable file
8
Assets/PlayMaker/Actions/Array/ArraySet.cs.meta
Executable file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de186d86d62e53c4ab432d55800df4f6
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
68
Assets/PlayMaker/Actions/Array/ArrayShuffle.cs
Executable file
68
Assets/PlayMaker/Actions/Array/ArrayShuffle.cs
Executable file
@@ -0,0 +1,68 @@
|
||||
// (c) Copyright HutongGames, LLC 2010-2014. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HutongGames.PlayMaker.Actions
|
||||
{
|
||||
[ActionCategory(ActionCategory.Array)]
|
||||
[Tooltip("Shuffle values in an array. Optionally set a start index and range to shuffle only part of the array.")]
|
||||
public class ArrayShuffle : FsmStateAction
|
||||
{
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[Tooltip("The Array to shuffle.")]
|
||||
public FsmArray array;
|
||||
|
||||
[Tooltip("Optional start Index for the shuffling. Leave it to none or 0 for no effect")]
|
||||
public FsmInt startIndex;
|
||||
|
||||
[Tooltip("Optional range for the shuffling, starting at the start index if greater than 0. Leave it to none or 0 for no effect, it will shuffle the whole array")]
|
||||
public FsmInt shufflingRange;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
array = null;
|
||||
startIndex = new FsmInt {UseVariable=true};
|
||||
shufflingRange = new FsmInt {UseVariable=true};
|
||||
}
|
||||
|
||||
// Code that runs on entering the state.
|
||||
public override void OnEnter()
|
||||
{
|
||||
List<object> _list = new List<object>(array.Values);
|
||||
|
||||
int start = 0;
|
||||
int end = _list.Count-1;
|
||||
|
||||
if (startIndex.Value>0)
|
||||
{
|
||||
start = Mathf.Min(startIndex.Value,end);
|
||||
}
|
||||
|
||||
if (shufflingRange.Value>0)
|
||||
{
|
||||
end = Mathf.Min(_list.Count-1,start + shufflingRange.Value);
|
||||
|
||||
}
|
||||
|
||||
// Knuth-Fisher-Yates algo
|
||||
|
||||
// for (int i = proxy.arrayList.Count - 1; i > 0; i--)
|
||||
for (int i = end; i > start; i--)
|
||||
{
|
||||
// Set swapWithPos a random position such that 0 <= swapWithPos <= i
|
||||
int swapWithPos = Random.Range(start,i + 1);
|
||||
|
||||
// Swap the value at the "current" position (i) with value at swapWithPos
|
||||
object tmp = _list[i];
|
||||
_list[i] = _list[swapWithPos];
|
||||
_list[swapWithPos] = tmp;
|
||||
}
|
||||
|
||||
array.Values = _list.ToArray();
|
||||
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user