mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2026-01-06 03:21:15 +07:00
Compare commits
125 Commits
2.4.1_revi
...
3.0.6_revi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7562afc37f | ||
|
|
772b3c7fc6 | ||
|
|
b175720fe1 | ||
| eab56615bc | |||
| 3c029384b8 | |||
| 0a3b85aef7 | |||
| d4de46f747 | |||
| 3bc2e45e0e | |||
| 454477a910 | |||
| 4f5197c138 | |||
| b7798b3ce0 | |||
| e7743e0b23 | |||
| 9611419aca | |||
| 82b2ef048c | |||
| 17a5f3461b | |||
| 5598188257 | |||
| f63205fcfb | |||
| f4ff267bc8 | |||
| c15b554759 | |||
| 20a3c5af59 | |||
| 5835494ebc | |||
| 696984fb06 | |||
| 5127b83dc4 | |||
| 16a671cba5 | |||
| 3b39893d39 | |||
| 4d7b8a0e7a | |||
| 6121483d21 | |||
| d636b19119 | |||
| 63f5ccff61 | |||
| ed980cfbd8 | |||
| ac8a1a670d | |||
| 33bc36687d | |||
| 97db117b84 | |||
| d3ee8394f7 | |||
| 5a68df63b2 | |||
| 9eaf2733dc | |||
| 736891754b | |||
| b407ff13de | |||
| 4dbdfd04b2 | |||
| 0d7ab882e5 | |||
| badbb0a53c | |||
| 7be90fa61a | |||
| f0b7f3165c | |||
| 26dbd35324 | |||
| df7838dd52 | |||
| f0ff0b16f8 | |||
| 336e2aecb9 | |||
| 6e15ee2d45 | |||
| 70a28c743d | |||
| f1a3025d44 | |||
| 6afa1e24f6 | |||
| c6de29bd5a | |||
| 7c40167da8 | |||
| 1c0a66cd01 | |||
| 8f997be60d | |||
| 10a33b001c | |||
| bebe8644ef | |||
| 3e9c6a8377 | |||
| 864727a50d | |||
| a7f4fee821 | |||
| 486c95f9cd | |||
| af5077a96d | |||
| 72c0850445 | |||
| 780d0391aa | |||
| 9bef427c5f | |||
| f3ed1f3236 | |||
| a0ec6a93eb | |||
| cc08f1e2c7 | |||
| 985274a710 | |||
| fde18817fa | |||
| 236e72d879 | |||
| c5084b1596 | |||
| d3016c5603 | |||
| 204960372a | |||
| 93b11c5ea0 | |||
| afd19224bb | |||
| 2d6f8d37f6 | |||
| 2ff0b86135 | |||
| b79a1adcd4 | |||
| fc6fac0ea2 | |||
| 8cff61ae91 | |||
| d74728b4df | |||
| d1fecf808e | |||
| 2a8a48d360 | |||
| 1627bf4f54 | |||
| ef85079c64 | |||
| eb533aa868 | |||
| 9e21f078ed | |||
| bdb2fdc489 | |||
| 475d3ece51 | |||
| 931e0267d9 | |||
| 26b4f8e7a6 | |||
| b3922d5cfe | |||
| 0746be1275 | |||
| 49a78c0d3f | |||
| dddd778c34 | |||
| 219799c404 | |||
| 71b609a6c8 | |||
| 521c0d2ff2 | |||
| e1c09e4552 | |||
| 184c903381 | |||
| 49ef44273e | |||
| 2493ffe382 | |||
| 302b0fdd25 | |||
| 22edab4e2a | |||
| 8227a29a22 | |||
| 14c5ab487c | |||
| c0c29b64c3 | |||
| 406a05675c | |||
| 88317b80f1 | |||
| 5a5dabf882 | |||
| 83ced8f772 | |||
| 4326c80a68 | |||
| f51d88e355 | |||
| 890e54f1b0 | |||
| e6ba2d8eb2 | |||
| 94dc2fa581 | |||
| 6c0e843b7f | |||
| eadc44f9f1 | |||
| b6a0f5c043 | |||
| 999685cf1a | |||
| 23ce28152c | |||
| 300f2eb8ca | |||
| 3bfc07706f | |||
| e80da29acb |
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
.vs/*
|
||||
.vscode/*
|
||||
|
||||
obj/*
|
||||
Temp/*
|
||||
Library/*
|
||||
|
||||
Assets/AssetStoreTools/*
|
||||
Assets/AssetStoreTools.meta
|
||||
|
||||
.DS_Store
|
||||
iso-tools.sln
|
||||
iso-tools.userprefs
|
||||
Assembly-CSharp.csproj
|
||||
Assembly-CSharp-Editor.csproj
|
||||
@@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{BD090B74-59E6-B8B4-61B5-2814183903F0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace></RootNamespace>
|
||||
<AssemblyName>Assembly-CSharp-Editor</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<BaseDirectory>Assets</BaseDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Temp\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;UNITY_5_1_4;UNITY_5_1;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_LICENSE;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_EDITOR_METRICS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Temp\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.XML" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\Editor\IsoObjectEditor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapAssetEditor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapEditor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapLayerEditor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapPostprocessor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapTilesetEditor.cs" />
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.UI">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.Networking">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Networking">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.Analytics">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Graphs">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/Frameworks/Managed/UnityEditor.Graphs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Android.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.BB10.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/BlackBerryPlayer/UnityEditor.BB10.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Tizen.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/TizenPlayer/UnityEditor.Tizen.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.SamsungTV.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/STVPlayer/UnityEditor.SamsungTV.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.WebGL.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.LinuxStandalone.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/LinuxStandaloneSupport/UnityEditor.LinuxStandalone.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.WindowsStandalone.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.OSXStandalone.Extensions">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/MacStandaloneSupport/UnityEditor.OSXStandalone.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions.Xcode">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="Assembly-CSharp-vs.csproj">
|
||||
<Project>{95166F85-0462-AC59-009C-63E7F7F767D5}</Project> <Name>Assembly-CSharp-vs</Name> </ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
||||
@@ -1,137 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<RootNamespace></RootNamespace>
|
||||
<ProjectGuid>{BD090B74-59E6-B8B4-61B5-2814183903F0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<AssemblyName>Assembly-CSharp-Editor</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<BaseDirectory>Assets</BaseDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Temp\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_5;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;PLAYMAKER;PLAYMAKER_1_8</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Temp\bin\Release\</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.XML" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\Editor\IsoObjectEditor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapAssetEditor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapAssetPostprocessor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapEditor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapLayerEditor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapPostprocessor.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\Internal\Editor\TiledMapTilesetEditor.cs" />
|
||||
<None Include="Assets\IsoTools\README.txt" />
|
||||
<None Include="Assets\IsoTools\CHANGELOG.txt" />
|
||||
<Reference Include="UnityEditor.Advertisements">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Advertisements/Editor/UnityEditor.Advertisements.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/EditorTestsRunner/Editor/nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.EditorTestsRunner">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/EditorTestsRunner/Editor/UnityEditor.EditorTestsRunner.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.UI">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.Networking">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Networking">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.TreeEditor">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Graphs">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.Graphs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Android.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.AppleTV.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/AppleTVSupport/UnityEditor.AppleTV.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.Tizen.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/TizenPlayer/UnityEditor.Tizen.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.SamsungTV.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/STVPlayer/UnityEditor.SamsungTV.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.WebGL.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.LinuxStandalone.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/LinuxStandaloneSupport/UnityEditor.LinuxStandalone.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.WindowsStandalone.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.OSXStandalone.Extensions">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/MacStandaloneSupport/UnityEditor.OSXStandalone.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions.Xcode">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/AppleTVSupport/UnityEditor.iOS.Extensions.Xcode.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions.Common">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/AppleTVSupport/UnityEditor.iOS.Extensions.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions.Xcode">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions.Common">
|
||||
<HintPath>/Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Common.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="Assembly-CSharp.csproj">
|
||||
<Project>{95166F85-0462-AC59-009C-63E7F7F767D5}</Project> <Name>Assembly-CSharp</Name> </ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
||||
@@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{95166F85-0462-AC59-009C-63E7F7F767D5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace></RootNamespace>
|
||||
<AssemblyName>Assembly-CSharp</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<BaseDirectory>Assets</BaseDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Temp\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;UNITY_5_1_4;UNITY_5_1;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_LICENSE;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_EDITOR_METRICS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Temp\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.XML" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\AlienBallController.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\AlienBallSpawner.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\CircleFly.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\CubeAutoMovement.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\IsoEchoListener.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\PlayerController.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoAssocList.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeObject.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeRigidbody.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoList.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoPhysicHelper.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoUtils.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoBoxCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoCollision.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoContactPoint.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoObject.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoRaycastHit.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoRigidbody.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoSphereCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoWorld.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMap.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMapAsset.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMapLayer.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMapProperties.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMapTileset.cs" />
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.Networking">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.Analytics">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.iOS.Extensions.Xcode">
|
||||
<HintPath>/Applications/Unity_5.1.4/Unity.app/Contents/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
||||
@@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<RootNamespace></RootNamespace>
|
||||
<ProjectGuid>{95166F85-0462-AC59-009C-63E7F7F767D5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<AssemblyName>Assembly-CSharp</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<BaseDirectory>Assets</BaseDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Temp\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_5;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;PLAYMAKER;PLAYMAKER_1_8</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Temp\bin\Release\</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>0169</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.XML" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor">
|
||||
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\AlienBallController.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\AlienBallSpawner.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\AlienDestroyer.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\CircleFly.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\CubeAutoMovement.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\IsoEchoListener.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\PlayerController.cs" />
|
||||
<Compile Include="Assets\IsoTools\Examples\Scripts\SceneController.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoAssocList.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeCollisionListener.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeObject.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeRigidbody.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeTriggerListener.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoList.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoPhysicHelper.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoPhysicHelperHolder.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoUtils.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoBoxCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoCapsuleCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoCollision.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoCollisionListener.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoContactPoint.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoObject.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoRaycastHit.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoRigidbody.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoSphereCollider.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoTriggerListener.cs" />
|
||||
<Compile Include="Assets\IsoTools\Scripts\IsoWorld.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMap.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMapAsset.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMapLayer.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMapProperties.cs" />
|
||||
<Compile Include="Assets\IsoTools\Tiled\TiledMapTileset.cs" />
|
||||
<None Include="Assets\IsoTools\README.txt" />
|
||||
<None Include="Assets\IsoTools\CHANGELOG.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>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d8953476a2b54c21899981284637e40
|
||||
guid: 90df07b38ec6e4d678babdff7426f98e
|
||||
folderAsset: yes
|
||||
timeCreated: 1436704661
|
||||
timeCreated: 1477130201
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95500b2c162ee45889fff8e8de30bdc5
|
||||
guid: 8dd47e4d38ef9485586318e48755aff9
|
||||
folderAsset: yes
|
||||
timeCreated: 1453182058
|
||||
timeCreated: 1480174284
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
9
Assets/IsoTools/Addons/Physics/Internal.meta
Normal file
9
Assets/IsoTools/Addons/Physics/Internal.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3a035a6c93424c7a98d81c8cb5aad1c
|
||||
folderAsset: yes
|
||||
timeCreated: 1480174340
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace IsoTools.Internal {
|
||||
namespace IsoTools.Physics.Internal {
|
||||
[AddComponentMenu("")]
|
||||
public class IsoFakeCollider : MonoBehaviour {
|
||||
|
||||
IsoCollider _isoCollider = null;
|
||||
|
||||
public IsoFakeCollider Init(IsoCollider iso_collider) {
|
||||
@@ -13,4 +15,4 @@ namespace IsoTools.Internal {
|
||||
get { return _isoCollider; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace IsoTools.Internal {
|
||||
namespace IsoTools.Physics.Internal {
|
||||
[AddComponentMenu("")]
|
||||
public class IsoFakeCollisionListener : MonoBehaviour {
|
||||
|
||||
GameObject _realGameObject = null;
|
||||
|
||||
public IsoFakeCollisionListener Init(IsoCollisionListener iso_listener) {
|
||||
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace IsoTools.Internal {
|
||||
namespace IsoTools.Physics.Internal {
|
||||
[AddComponentMenu("")]
|
||||
public class IsoFakeObject : MonoBehaviour {
|
||||
|
||||
IsoObject _isoObject = null;
|
||||
@@ -25,11 +26,11 @@ namespace IsoTools.Internal {
|
||||
|
||||
void FixedUpdate() {
|
||||
CheckLayers();
|
||||
if ( !IsoUtils.Vec3Approximately(_lastPosition, isoObject.position) ) {
|
||||
if ( _lastPosition != isoObject.position ) {
|
||||
_lastPosition = transform.position = isoObject.position;
|
||||
} else if ( !IsoUtils.Vec3Approximately(_lastPosition, transform.position) ) {
|
||||
} else if ( _lastPosition != transform.position ) {
|
||||
_lastPosition = isoObject.position = transform.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace IsoTools.Internal {
|
||||
namespace IsoTools.Physics.Internal {
|
||||
[AddComponentMenu("")]
|
||||
public class IsoFakeRigidbody : MonoBehaviour {
|
||||
|
||||
IsoRigidbody _isoRigidbody = null;
|
||||
|
||||
public IsoFakeRigidbody Init(IsoRigidbody iso_rigidbody) {
|
||||
@@ -13,4 +15,4 @@ namespace IsoTools.Internal {
|
||||
get { return _isoRigidbody; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace IsoTools.Internal {
|
||||
namespace IsoTools.Physics.Internal {
|
||||
[AddComponentMenu("")]
|
||||
public class IsoFakeTriggerListener : MonoBehaviour {
|
||||
|
||||
GameObject _realGameObject = null;
|
||||
|
||||
public IsoFakeTriggerListener Init(IsoTriggerListener iso_listener) {
|
||||
@@ -12,14 +14,14 @@ namespace IsoTools.Internal {
|
||||
void OnTriggerEnter(Collider collider) {
|
||||
_realGameObject.SendMessage(
|
||||
"OnIsoTriggerEnter",
|
||||
IsoUtils.IsoConvertCollider(collider),
|
||||
IsoPhysicsUtils.IsoConvertCollider(collider),
|
||||
SendMessageOptions.DontRequireReceiver);
|
||||
}
|
||||
|
||||
void OnTriggerExit(Collider collider) {
|
||||
_realGameObject.SendMessage(
|
||||
"OnIsoTriggerExit",
|
||||
IsoUtils.IsoConvertCollider(collider),
|
||||
IsoPhysicsUtils.IsoConvertCollider(collider),
|
||||
SendMessageOptions.DontRequireReceiver);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IsoTools.Internal {
|
||||
namespace IsoTools.Physics.Internal {
|
||||
[AddComponentMenu("")]
|
||||
[DisallowMultipleComponent]
|
||||
[RequireComponent(typeof(IsoObject))]
|
||||
public class IsoPhysicHelper : MonoBehaviour {
|
||||
public class IsoPhysicsHelper : MonoBehaviour {
|
||||
|
||||
GameObject _isoFakeObject = null;
|
||||
public GameObject isoFakeObject {
|
||||
@@ -29,4 +29,4 @@ namespace IsoTools.Internal {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Internal;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IsoTools.Physics.Internal {
|
||||
[AddComponentMenu("")]
|
||||
public class IsoPhysicsHelperHolder : MonoBehaviour {
|
||||
|
||||
static List<IsoPhysicsHelperHolder> _tmpHolders = new List<IsoPhysicsHelperHolder>(7);
|
||||
|
||||
protected GameObject fakeObject {
|
||||
get { return physicsHelper.isoFakeObject; }
|
||||
}
|
||||
|
||||
protected IsoPhysicsHelper physicsHelper {
|
||||
get { return IsoUtils.GetOrCreateComponent<IsoPhysicsHelper>(gameObject); }
|
||||
}
|
||||
|
||||
protected void DestroyUnnecessaryCheck() {
|
||||
GetComponents<IsoPhysicsHelperHolder>(_tmpHolders);
|
||||
if ( _tmpHolders.Count == 1 && _tmpHolders[0] == this ) {
|
||||
Destroy(physicsHelper);
|
||||
}
|
||||
_tmpHolders.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Assets/IsoTools/Addons/Physics/Internal/IsoPhysicsUtils.cs
Normal file
37
Assets/IsoTools/Addons/Physics/Internal/IsoPhysicsUtils.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace IsoTools.Physics.Internal {
|
||||
public static class IsoPhysicsUtils {
|
||||
public static IsoCollider IsoConvertCollider(Collider collider) {
|
||||
var fake_collider = collider ? collider.GetComponent<IsoFakeCollider>() : null;
|
||||
return fake_collider ? fake_collider.isoCollider : null;
|
||||
}
|
||||
|
||||
public static IsoRigidbody IsoConvertRigidbody(Rigidbody rigidbody) {
|
||||
var fake_rigidbody = rigidbody ? rigidbody.GetComponent<IsoFakeRigidbody>() : null;
|
||||
return fake_rigidbody ? fake_rigidbody.isoRigidbody : null;
|
||||
}
|
||||
|
||||
public static GameObject IsoConvertGameObject(GameObject game_object) {
|
||||
var fake_object = game_object ? game_object.GetComponent<IsoFakeObject>() : null;
|
||||
var iso_object = fake_object ? fake_object.isoObject : null;
|
||||
return iso_object ? iso_object.gameObject : null;
|
||||
}
|
||||
|
||||
public static IsoContactPoint[] IsoConvertContactPoints(ContactPoint[] points) {
|
||||
var iso_points = new IsoContactPoint[points.Length];
|
||||
for ( int i = 0, e = points.Length; i < e; ++i ) {
|
||||
iso_points[i] = new IsoContactPoint(points[i]);
|
||||
}
|
||||
return iso_points;
|
||||
}
|
||||
|
||||
public static IsoRaycastHit[] IsoConvertRaycastHits(RaycastHit[] hits) {
|
||||
var iso_hits = new IsoRaycastHit[hits.Length];
|
||||
for ( int i = 0, e = hits.Length; i < e; ++i ) {
|
||||
iso_hits[i] = new IsoRaycastHit(hits[i]);
|
||||
}
|
||||
return iso_hits;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d44532ca15804cdc997583d81cf4df1
|
||||
timeCreated: 1480196616
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -5,7 +5,7 @@ using IsoTools.Internal;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
[RequireComponent(typeof(IsoObject))]
|
||||
public class IsoBoxCollider : IsoCollider {
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace IsoTools {
|
||||
void OnDrawGizmosSelected() {
|
||||
var iso_object = GetComponent<IsoObject>();
|
||||
if ( iso_object && iso_object.isoWorld ) {
|
||||
IsoUtils.DrawCube(
|
||||
IsoUtils.DrawIsoCube(
|
||||
iso_object.isoWorld,
|
||||
iso_object.position + offset,
|
||||
size,
|
||||
@@ -74,4 +74,4 @@ namespace IsoTools {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using IsoTools.Internal;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
[RequireComponent(typeof(IsoObject))]
|
||||
public class IsoCapsuleCollider : IsoCollider {
|
||||
|
||||
@@ -82,23 +82,23 @@ namespace IsoTools {
|
||||
var iso_object = GetComponent<IsoObject>();
|
||||
if ( iso_object && iso_object.isoWorld ) {
|
||||
if ( radius * 2 < height ) {
|
||||
IsoUtils.DrawCube(
|
||||
IsoUtils.DrawIsoCube(
|
||||
iso_object.isoWorld,
|
||||
iso_object.position + offset,
|
||||
new Vector3(radius * 2.0f, radius * 2.0f, height - radius),
|
||||
Color.green);
|
||||
IsoUtils.DrawSphere(
|
||||
IsoUtils.DrawIsoSphere(
|
||||
iso_object.isoWorld,
|
||||
iso_object.position + offset - IsoUtils.Vec3FromZ(height * 0.5f - radius),
|
||||
radius,
|
||||
Color.green);
|
||||
IsoUtils.DrawSphere(
|
||||
IsoUtils.DrawIsoSphere(
|
||||
iso_object.isoWorld,
|
||||
iso_object.position + offset + IsoUtils.Vec3FromZ(height * 0.5f - radius),
|
||||
radius,
|
||||
Color.green);
|
||||
} else {
|
||||
IsoUtils.DrawSphere(
|
||||
IsoUtils.DrawIsoSphere(
|
||||
iso_object.isoWorld,
|
||||
iso_object.position + offset,
|
||||
radius,
|
||||
@@ -108,4 +108,4 @@ namespace IsoTools {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Internal;
|
||||
using IsoTools.Physics.Internal;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
[RequireComponent(typeof(IsoObject))]
|
||||
public abstract class IsoCollider : IsoPhysicHelperHolder {
|
||||
public abstract class IsoCollider : IsoPhysicsHelperHolder {
|
||||
protected abstract Collider CreateRealCollider(GameObject target);
|
||||
|
||||
IsoFakeCollider _fakeCollider;
|
||||
|
||||
Collider _realCollider = null;
|
||||
protected Collider realCollider {
|
||||
public Collider realCollider {
|
||||
get { return _realCollider; }
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace IsoTools {
|
||||
public IsoRigidbody attachedRigidbody {
|
||||
get {
|
||||
return realCollider
|
||||
? IsoUtils.IsoConvertRigidbody(realCollider.attachedRigidbody)
|
||||
? IsoPhysicsUtils.IsoConvertRigidbody(realCollider.attachedRigidbody)
|
||||
: null;
|
||||
}
|
||||
}
|
||||
@@ -126,4 +126,4 @@ namespace IsoTools {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Internal;
|
||||
using IsoTools.Physics.Internal;
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
public class IsoCollision {
|
||||
|
||||
public IsoCollider collider { get; private set; }
|
||||
@@ -12,12 +12,12 @@ namespace IsoTools {
|
||||
public IsoRigidbody rigidbody { get; private set; }
|
||||
|
||||
public IsoCollision(Collision collision) {
|
||||
collider = IsoUtils.IsoConvertCollider(collision.collider);
|
||||
contacts = IsoUtils.IsoConvertContactPoints(collision.contacts);
|
||||
gameObject = IsoUtils.IsoConvertGameObject(collision.gameObject);
|
||||
collider = IsoPhysicsUtils.IsoConvertCollider(collision.collider);
|
||||
contacts = IsoPhysicsUtils.IsoConvertContactPoints(collision.contacts);
|
||||
gameObject = IsoPhysicsUtils.IsoConvertGameObject(collision.gameObject);
|
||||
impulse = collision.impulse;
|
||||
relativeVelocity = collision.relativeVelocity;
|
||||
rigidbody = IsoUtils.IsoConvertRigidbody(collision.rigidbody);
|
||||
rigidbody = IsoPhysicsUtils.IsoConvertRigidbody(collision.rigidbody);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Internal;
|
||||
using IsoTools.Physics.Internal;
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
[DisallowMultipleComponent]
|
||||
[RequireComponent(typeof(IsoObject))]
|
||||
public class IsoCollisionListener : IsoPhysicHelperHolder {
|
||||
public class IsoCollisionListener : IsoPhysicsHelperHolder {
|
||||
|
||||
IsoFakeCollisionListener _fakeListener;
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Internal;
|
||||
using IsoTools.Physics.Internal;
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
public struct IsoContactPoint {
|
||||
|
||||
public Vector3 normal { get; private set; }
|
||||
public IsoCollider otherCollider { get; private set; }
|
||||
public Vector3 point { get; private set; }
|
||||
public float separation { get; private set; }
|
||||
public IsoCollider thisCollider { get; private set; }
|
||||
|
||||
public IsoContactPoint(ContactPoint contact_point) : this() {
|
||||
normal = contact_point.normal;
|
||||
otherCollider = IsoUtils.IsoConvertCollider(contact_point.otherCollider);
|
||||
otherCollider = IsoPhysicsUtils.IsoConvertCollider(contact_point.otherCollider);
|
||||
point = contact_point.point;
|
||||
thisCollider = IsoUtils.IsoConvertCollider(contact_point.thisCollider);
|
||||
separation = contact_point.separation;
|
||||
thisCollider = IsoPhysicsUtils.IsoConvertCollider(contact_point.thisCollider);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
328
Assets/IsoTools/Addons/Physics/IsoPhysics.cs
Normal file
328
Assets/IsoTools/Addons/Physics/IsoPhysics.cs
Normal file
@@ -0,0 +1,328 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics.Internal;
|
||||
|
||||
namespace IsoTools.Physics {
|
||||
public static class IsoPhysics {
|
||||
|
||||
//
|
||||
// Ignore collision helpers
|
||||
//
|
||||
|
||||
public static bool GetIgnoreLayerCollision(int layer1, int layer2) {
|
||||
return UnityEngine.Physics.GetIgnoreLayerCollision(layer1, layer2);
|
||||
}
|
||||
|
||||
public static void IgnoreCollision(IsoCollider iso_collider1, IsoCollider iso_collider2,
|
||||
bool ignore = true)
|
||||
{
|
||||
UnityEngine.Physics.IgnoreCollision(
|
||||
iso_collider1.realCollider, iso_collider2.realCollider, ignore);
|
||||
}
|
||||
|
||||
public static void IgnoreLayerCollision(int layer1, int layer2,
|
||||
bool ignore = true)
|
||||
{
|
||||
UnityEngine.Physics.IgnoreLayerCollision(layer1, layer2, ignore);
|
||||
}
|
||||
|
||||
//
|
||||
// Raycast
|
||||
//
|
||||
|
||||
public static bool Raycast(Ray ray, out IsoRaycastHit iso_hit_info,
|
||||
float max_distance = Mathf.Infinity,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_info = new RaycastHit();
|
||||
var result = UnityEngine.Physics.Raycast(ray, out hit_info,
|
||||
max_distance,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
iso_hit_info = result ? new IsoRaycastHit(hit_info) : new IsoRaycastHit();
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// RaycastNonAlloc
|
||||
//
|
||||
|
||||
public static int RaycastNonAlloc(Ray ray, IsoRaycastHit[] results,
|
||||
float max_distance = Mathf.Infinity,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
do {
|
||||
var hit_count = UnityEngine.Physics.RaycastNonAlloc(ray, _raycastNonAllocBuffer,
|
||||
max_distance,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
if ( hit_count >= results.Length || hit_count < _raycastNonAllocBuffer.Length ) {
|
||||
return RaycastBufferToIsoRaycastHits(hit_count, results);
|
||||
} else {
|
||||
_raycastNonAllocBuffer = new RaycastHit[_raycastNonAllocBuffer.Length * 2];
|
||||
}
|
||||
} while ( true );
|
||||
}
|
||||
|
||||
//
|
||||
// Linecast
|
||||
//
|
||||
|
||||
public static bool Linecast(
|
||||
Vector3 start, Vector3 end, out IsoRaycastHit iso_hit_info,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_info = new RaycastHit();
|
||||
var result = UnityEngine.Physics.Linecast(start, end, out hit_info,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
iso_hit_info = result ? new IsoRaycastHit(hit_info) : new IsoRaycastHit();
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// CheckBox
|
||||
//
|
||||
|
||||
public static bool CheckBox(
|
||||
Vector3 center, Vector3 half_extents,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
return UnityEngine.Physics.CheckBox(
|
||||
center, half_extents,
|
||||
Quaternion.identity,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
}
|
||||
|
||||
//
|
||||
// CheckCapsule
|
||||
//
|
||||
|
||||
public static bool CheckCapsule(
|
||||
Vector3 start, Vector3 end, float radius,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
return UnityEngine.Physics.CheckCapsule(
|
||||
start, end, radius,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
}
|
||||
|
||||
//
|
||||
// CheckSphere
|
||||
//
|
||||
|
||||
public static bool CheckSphere(
|
||||
Vector3 position, float radius,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
return UnityEngine.Physics.CheckSphere(
|
||||
position, radius,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
}
|
||||
|
||||
//
|
||||
// BoxCast
|
||||
//
|
||||
|
||||
public static bool BoxCast(
|
||||
Vector3 center, Vector3 half_extents, Vector3 direction, out IsoRaycastHit iso_hit_info,
|
||||
float max_distance = Mathf.Infinity,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_info = new RaycastHit();
|
||||
var result = UnityEngine.Physics.BoxCast(
|
||||
center, half_extents, direction, out hit_info,
|
||||
Quaternion.identity,
|
||||
max_distance,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
iso_hit_info = result ? new IsoRaycastHit(hit_info) : new IsoRaycastHit();
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// BoxCastNonAlloc
|
||||
//
|
||||
|
||||
public static int BoxCastNonAlloc(
|
||||
Vector3 center, Vector3 half_extents, Vector3 direction, IsoRaycastHit[] results,
|
||||
float max_distance = Mathf.Infinity,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_count = UnityEngine.Physics.BoxCastNonAlloc(
|
||||
center, half_extents, direction, _raycastNonAllocBuffer,
|
||||
Quaternion.identity,
|
||||
max_distance,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
return RaycastBufferToIsoRaycastHits(hit_count, results);
|
||||
}
|
||||
|
||||
//
|
||||
// CapsuleCast
|
||||
//
|
||||
|
||||
public static bool CapsuleCast(
|
||||
Vector3 point1, Vector3 point2, float radius, Vector3 direction, out IsoRaycastHit iso_hit_info,
|
||||
float max_distance = Mathf.Infinity,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_info = new RaycastHit();
|
||||
var result = UnityEngine.Physics.CapsuleCast(
|
||||
point1, point2, radius, direction, out hit_info,
|
||||
max_distance,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
iso_hit_info = result ? new IsoRaycastHit(hit_info) : new IsoRaycastHit();
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// CapsuleCastNonAlloc
|
||||
//
|
||||
|
||||
public static int CapsuleCastNonAlloc(
|
||||
Vector3 point1, Vector3 point2, float radius, Vector3 direction, IsoRaycastHit[] results,
|
||||
float max_distance = Mathf.Infinity,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_count = UnityEngine.Physics.CapsuleCastNonAlloc(
|
||||
point1, point2, radius, direction, _raycastNonAllocBuffer,
|
||||
max_distance,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
return RaycastBufferToIsoRaycastHits(hit_count, results);
|
||||
}
|
||||
|
||||
//
|
||||
// SphereCast
|
||||
//
|
||||
|
||||
public static bool SphereCast(
|
||||
Vector3 origin, float radius, Vector3 direction, out IsoRaycastHit iso_hit_info,
|
||||
float max_distance = Mathf.Infinity,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_info = new RaycastHit();
|
||||
var result = UnityEngine.Physics.SphereCast(
|
||||
origin, radius, direction, out hit_info,
|
||||
max_distance,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
iso_hit_info = result ? new IsoRaycastHit(hit_info) : new IsoRaycastHit();
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// SphereCastNonAlloc
|
||||
//
|
||||
|
||||
public static int SphereCastNonAlloc(
|
||||
Vector3 origin, float radius, Vector3 direction, IsoRaycastHit[] results,
|
||||
float max_distance = Mathf.Infinity,
|
||||
int layer_mask = UnityEngine.Physics.DefaultRaycastLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_count = UnityEngine.Physics.SphereCastNonAlloc(
|
||||
origin, radius, direction, _raycastNonAllocBuffer,
|
||||
max_distance,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
return RaycastBufferToIsoRaycastHits(hit_count, results);
|
||||
}
|
||||
|
||||
//
|
||||
// OverlapBoxNonAlloc
|
||||
//
|
||||
|
||||
public static int OverlapBoxNonAlloc(
|
||||
Vector3 center, Vector3 half_extents, IsoCollider[] results,
|
||||
int layer_mask = UnityEngine.Physics.AllLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
do {
|
||||
var collider_count = UnityEngine.Physics.OverlapBoxNonAlloc(
|
||||
center, half_extents, _overlapNonAllocBuffer,
|
||||
Quaternion.identity,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
if ( collider_count >= results.Length || collider_count < _overlapNonAllocBuffer.Length ) {
|
||||
return OverlapBufferToIsoColliders(collider_count, results);
|
||||
} else {
|
||||
_overlapNonAllocBuffer = new Collider[_overlapNonAllocBuffer.Length * 2];
|
||||
}
|
||||
} while ( true );
|
||||
}
|
||||
|
||||
//
|
||||
// OverlapCapsuleNonAlloc
|
||||
//
|
||||
|
||||
public static int OverlapCapsuleNonAlloc(
|
||||
Vector3 point0, Vector3 point1, float radius, IsoCollider[] results,
|
||||
int layer_mask = UnityEngine.Physics.AllLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var collider_count = UnityEngine.Physics.OverlapCapsuleNonAlloc(
|
||||
point0, point1, radius, _overlapNonAllocBuffer,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
return OverlapBufferToIsoColliders(collider_count, results);
|
||||
}
|
||||
|
||||
//
|
||||
// OverlapSphereNonAlloc
|
||||
//
|
||||
|
||||
public static int OverlapSphereNonAlloc(
|
||||
Vector3 position, float radius, IsoCollider[] results,
|
||||
int layer_mask = UnityEngine.Physics.AllLayers,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var collider_count = UnityEngine.Physics.OverlapSphereNonAlloc(
|
||||
position, radius, _overlapNonAllocBuffer,
|
||||
layer_mask,
|
||||
query_trigger_interaction);
|
||||
return OverlapBufferToIsoColliders(collider_count, results);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Private
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
static RaycastHit[] _raycastNonAllocBuffer = new RaycastHit[128];
|
||||
static int RaycastBufferToIsoRaycastHits(int hit_count, IsoRaycastHit[] results) {
|
||||
var min_hit_count = Mathf.Min(hit_count, results.Length);
|
||||
for ( var i = 0; i < min_hit_count; ++i ) {
|
||||
results[i] = new IsoRaycastHit(_raycastNonAllocBuffer[i]);
|
||||
}
|
||||
System.Array.Clear(_raycastNonAllocBuffer, 0, hit_count);
|
||||
return min_hit_count;
|
||||
}
|
||||
|
||||
static Collider[] _overlapNonAllocBuffer = new Collider[128];
|
||||
static int OverlapBufferToIsoColliders(int collider_count, IsoCollider[] results) {
|
||||
var min_collider_count = Mathf.Min(collider_count, results.Length);
|
||||
for ( var i = 0; i < min_collider_count; ++i ) {
|
||||
results[i] = IsoPhysicsUtils.IsoConvertCollider(_overlapNonAllocBuffer[i]);
|
||||
}
|
||||
System.Array.Clear(_overlapNonAllocBuffer, 0, collider_count);
|
||||
return min_collider_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/IsoTools/Addons/Physics/IsoPhysics.cs.meta
Normal file
12
Assets/IsoTools/Addons/Physics/IsoPhysics.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40ab1c30204174ffa8d877e00af23a62
|
||||
timeCreated: 1480174712
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Internal;
|
||||
using IsoTools.Physics.Internal;
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
public struct IsoRaycastHit {
|
||||
|
||||
public IsoCollider collider { get; private set; }
|
||||
@@ -11,11 +11,11 @@ namespace IsoTools {
|
||||
public IsoRigidbody rigidbody { get; private set; }
|
||||
|
||||
public IsoRaycastHit(RaycastHit hit_info) : this() {
|
||||
collider = IsoUtils.IsoConvertCollider(hit_info.collider);
|
||||
collider = IsoPhysicsUtils.IsoConvertCollider(hit_info.collider);
|
||||
distance = hit_info.distance;
|
||||
normal = hit_info.normal;
|
||||
point = hit_info.point;
|
||||
rigidbody = IsoUtils.IsoConvertRigidbody(hit_info.rigidbody);
|
||||
rigidbody = IsoPhysicsUtils.IsoConvertRigidbody(hit_info.rigidbody);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Internal;
|
||||
using IsoTools.Physics.Internal;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
[DisallowMultipleComponent]
|
||||
[RequireComponent(typeof(IsoObject))]
|
||||
public class IsoRigidbody : IsoPhysicHelperHolder {
|
||||
public class IsoRigidbody : IsoPhysicsHelperHolder {
|
||||
|
||||
IsoFakeRigidbody _fakeRigidbody;
|
||||
|
||||
@@ -125,24 +125,24 @@ namespace IsoTools {
|
||||
}
|
||||
}
|
||||
|
||||
public int solverIterationCount {
|
||||
get { return realRigidbody ? realRigidbody.solverIterationCount : 0; }
|
||||
public int solverIterations {
|
||||
get { return realRigidbody ? realRigidbody.solverIterations : 0; }
|
||||
set {
|
||||
if ( realRigidbody ) {
|
||||
realRigidbody.solverIterationCount = value;
|
||||
realRigidbody.solverIterations = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool useConeFriction {
|
||||
get { return realRigidbody ? realRigidbody.useConeFriction : false; }
|
||||
public int solverVelocityIterations {
|
||||
get { return realRigidbody ? realRigidbody.solverVelocityIterations : 0; }
|
||||
set {
|
||||
if ( realRigidbody ) {
|
||||
realRigidbody.useConeFriction = value;
|
||||
realRigidbody.solverVelocityIterations = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Vector3 velocity {
|
||||
get { return realRigidbody ? realRigidbody.velocity : Vector3.zero; }
|
||||
set {
|
||||
@@ -156,26 +156,10 @@ namespace IsoTools {
|
||||
get { return realRigidbody ? realRigidbody.worldCenterOfMass : Vector3.zero; }
|
||||
}
|
||||
|
||||
public void AddExplosionForce(
|
||||
float explosion_force, Vector3 explosion_position, float explosion_radius)
|
||||
{
|
||||
AddExplosionForce(
|
||||
explosion_force, explosion_position, explosion_radius,
|
||||
0.0f, ForceMode.Force);
|
||||
}
|
||||
|
||||
public void AddExplosionForce(
|
||||
float explosion_force, Vector3 explosion_position, float explosion_radius,
|
||||
float upwards_modifier)
|
||||
{
|
||||
AddExplosionForce(
|
||||
explosion_force, explosion_position, explosion_radius,
|
||||
upwards_modifier, ForceMode.Force);
|
||||
}
|
||||
|
||||
public void AddExplosionForce(
|
||||
float explosion_force, Vector3 explosion_position, float explosion_radius,
|
||||
float upwards_modifier, ForceMode mode)
|
||||
float upwards_modifier = 0.0f,
|
||||
ForceMode mode = ForceMode.Force)
|
||||
{
|
||||
if ( realRigidbody ) {
|
||||
realRigidbody.AddExplosionForce(
|
||||
@@ -184,31 +168,25 @@ namespace IsoTools {
|
||||
}
|
||||
}
|
||||
|
||||
public void AddForce(Vector3 force) {
|
||||
AddForce(force, ForceMode.Force);
|
||||
}
|
||||
|
||||
public void AddForce(Vector3 force, ForceMode mode) {
|
||||
public void AddForce(Vector3 force,
|
||||
ForceMode mode = ForceMode.Force)
|
||||
{
|
||||
if ( realRigidbody ) {
|
||||
realRigidbody.AddForce(force, mode);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddForceAtPosition(Vector3 force, Vector3 position) {
|
||||
AddForceAtPosition(force, position, ForceMode.Force);
|
||||
}
|
||||
|
||||
public void AddForceAtPosition(Vector3 force, Vector3 position, ForceMode mode) {
|
||||
public void AddForceAtPosition(Vector3 force, Vector3 position,
|
||||
ForceMode mode = ForceMode.Force)
|
||||
{
|
||||
if ( realRigidbody ) {
|
||||
realRigidbody.AddForceAtPosition(force, position, mode);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRelativeForce(Vector3 force) {
|
||||
AddRelativeForce(force, ForceMode.Force);
|
||||
}
|
||||
|
||||
public void AddRelativeForce(Vector3 force, ForceMode mode) {
|
||||
public void AddRelativeForce(Vector3 force,
|
||||
ForceMode mode = ForceMode.Force)
|
||||
{
|
||||
if ( realRigidbody ) {
|
||||
realRigidbody.AddRelativeForce(force, mode);
|
||||
}
|
||||
@@ -268,17 +246,9 @@ namespace IsoTools {
|
||||
}
|
||||
}
|
||||
|
||||
public bool SweepTest(Vector3 direction, out IsoRaycastHit iso_hit_info) {
|
||||
return SweepTest(direction, out iso_hit_info, Mathf.Infinity, QueryTriggerInteraction.UseGlobal);
|
||||
}
|
||||
|
||||
public bool SweepTest(Vector3 direction, out IsoRaycastHit iso_hit_info, float max_distance) {
|
||||
return SweepTest(direction, out iso_hit_info, max_distance, QueryTriggerInteraction.UseGlobal);
|
||||
}
|
||||
|
||||
public bool SweepTest(
|
||||
Vector3 direction, out IsoRaycastHit iso_hit_info,
|
||||
float max_distance, QueryTriggerInteraction query_trigger_interaction)
|
||||
public bool SweepTest(Vector3 direction, out IsoRaycastHit iso_hit_info,
|
||||
float max_distance = Mathf.Infinity,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
var hit_info = new RaycastHit();
|
||||
var result = realRigidbody
|
||||
@@ -288,20 +258,13 @@ namespace IsoTools {
|
||||
return result;
|
||||
}
|
||||
|
||||
public IsoRaycastHit[] SweepTestAll(Vector3 direction) {
|
||||
return SweepTestAll(direction, Mathf.Infinity, QueryTriggerInteraction.UseGlobal);
|
||||
}
|
||||
|
||||
public IsoRaycastHit[] SweepTestAll(Vector3 direction, float max_distance) {
|
||||
return SweepTestAll(direction, max_distance, QueryTriggerInteraction.UseGlobal);
|
||||
}
|
||||
|
||||
public IsoRaycastHit[] SweepTestAll(
|
||||
Vector3 direction,
|
||||
float max_distance, QueryTriggerInteraction query_trigger_interaction)
|
||||
public IsoRaycastHit[] SweepTestAll(Vector3 direction,
|
||||
float max_distance = Mathf.Infinity,
|
||||
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
|
||||
{
|
||||
return realRigidbody
|
||||
? IsoUtils.IsoConvertRaycastHits(realRigidbody.SweepTestAll(direction, max_distance, query_trigger_interaction))
|
||||
? IsoPhysicsUtils.IsoConvertRaycastHits(
|
||||
realRigidbody.SweepTestAll(direction, max_distance, query_trigger_interaction))
|
||||
: new IsoRaycastHit[0];
|
||||
}
|
||||
|
||||
@@ -368,4 +331,4 @@ namespace IsoTools {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using IsoTools.Internal;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
[RequireComponent(typeof(IsoObject))]
|
||||
public class IsoSphereCollider : IsoCollider {
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace IsoTools {
|
||||
void OnDrawGizmosSelected() {
|
||||
var iso_object = GetComponent<IsoObject>();
|
||||
if ( iso_object && iso_object.isoWorld ) {
|
||||
IsoUtils.DrawSphere(
|
||||
IsoUtils.DrawIsoSphere(
|
||||
iso_object.isoWorld,
|
||||
iso_object.position + offset,
|
||||
radius,
|
||||
@@ -74,4 +74,4 @@ namespace IsoTools {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using UnityEngine;
|
||||
using IsoTools.Internal;
|
||||
using IsoTools.Physics.Internal;
|
||||
|
||||
namespace IsoTools {
|
||||
namespace IsoTools.Physics {
|
||||
[DisallowMultipleComponent]
|
||||
[RequireComponent(typeof(IsoObject))]
|
||||
public class IsoTriggerListener : IsoPhysicHelperHolder {
|
||||
public class IsoTriggerListener : IsoPhysicsHelperHolder {
|
||||
|
||||
IsoFakeTriggerListener _fakeListener;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8b3ac68bbc98425a9242e12a4d2951c
|
||||
guid: a3264192dd6f94e708ddbcd72bf32a61
|
||||
folderAsset: yes
|
||||
timeCreated: 1449997605
|
||||
timeCreated: 1477130201
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
9
Assets/IsoTools/Addons/PlayMaker/Actions.meta
Normal file
9
Assets/IsoTools/Addons/PlayMaker/Actions.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a23c47afc2e94d18abf9f1cb58fb612
|
||||
folderAsset: yes
|
||||
timeCreated: 1449997824
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Applies a force to a IsoRigidbody that simulates explosion effects. " +
|
||||
"The explosion force will fall off linearly with distance.")]
|
||||
public class IsoAddExplosionForce : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"The IsoRigidbody to add the explosion force to.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"The center of the explosion.")]
|
||||
public FsmVector3 center;
|
||||
|
||||
[RequiredField]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"The strength of the explosion.")]
|
||||
public FsmFloat force;
|
||||
|
||||
[RequiredField]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"The radius of the explosion.")]
|
||||
public FsmFloat radius;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Applies the force as if it was applied from beneath the object.")]
|
||||
public FsmFloat upwardsModifier;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"The type of force to apply.")]
|
||||
public ForceMode forceMode;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
center = null;
|
||||
force = null;
|
||||
radius = null;
|
||||
upwardsModifier = 0.0f;
|
||||
forceMode = ForceMode.Force;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnPreprocess() {
|
||||
Fsm.HandleFixedUpdate = true;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
isoRigidbody.AddExplosionForce(
|
||||
force.Value, center.Value, radius.Value,
|
||||
upwardsModifier.Value, forceMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8925808e9509b47b187c8890c644ba0c
|
||||
timeCreated: 1450615607
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
102
Assets/IsoTools/Addons/PlayMaker/Actions/IsoAddForce.cs
Normal file
102
Assets/IsoTools/Addons/PlayMaker/Actions/IsoAddForce.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Adds a force to a IsoRigidbody. " +
|
||||
"Use Vector3 variable and/or Float variables for each axis.")]
|
||||
public class IsoAddForce : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"The IsoRigidbody to apply the force to.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Optionally apply the force at a position on the object.")]
|
||||
public FsmVector3 atPosition;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"A Vector3 force to add. " +
|
||||
"Optionally override any axis with the X, Y, Z parameters.")]
|
||||
public FsmVector3 vector;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Force along the X axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat x;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Force along the Y axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat y;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Force along the Z axis. To leave unchanged, set to 'None'.")]
|
||||
public FsmFloat z;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Apply the force in world or local space.")]
|
||||
public Space space;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"The type of force to apply.")]
|
||||
public ForceMode forceMode;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
atPosition = new FsmVector3{UseVariable = true};
|
||||
vector = null;
|
||||
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() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = vector.IsNone ? Vector3.zero : vector.Value;
|
||||
if ( !x.IsNone ) { value.x = x.Value; }
|
||||
if ( !y.IsNone ) { value.y = y.Value; }
|
||||
if ( !z.IsNone ) { value.z = z.Value; }
|
||||
if ( space == Space.World ) {
|
||||
if ( atPosition.IsNone ) {
|
||||
isoRigidbody.AddForce(value, forceMode);
|
||||
} else {
|
||||
isoRigidbody.AddForceAtPosition(
|
||||
value, atPosition.Value, forceMode);
|
||||
}
|
||||
} else {
|
||||
isoRigidbody.AddRelativeForce(value, forceMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoAddForce.cs.meta
Normal file
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoAddForce.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f982e9e34e40d48b4a0645425b0d6c3a
|
||||
timeCreated: 1450614193
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,68 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Convert Isometric Vector3 Variable to ScreenSpace Vector2 Variable")]
|
||||
public class IsoConvertIsometricToScreen : IsoComponentAction<IsoWorld> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoWorld))]
|
||||
[HutongGames.PlayMaker.Title("IsoWorld (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("The IsoWorld for convertation.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Isometric Vector (In)")]
|
||||
public FsmVector3 isometricVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Screen Vector (Out)")]
|
||||
public FsmVector2 storeScreenVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Screen X (Out)")]
|
||||
public FsmFloat storeScreenX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Screen Y (Out)")]
|
||||
public FsmFloat storeScreenY;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
isometricVector = null;
|
||||
storeScreenVector = null;
|
||||
storeScreenX = null;
|
||||
storeScreenY = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoWorld.IsoToScreen(isometricVector.Value);
|
||||
storeScreenVector.Value = value;
|
||||
storeScreenX.Value = value.x;
|
||||
storeScreenY.Value = value.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b59e8593133b453bb434f86de86993a
|
||||
timeCreated: 1450193215
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Convert ScreenSpace Vector2 Variable to Isometric Vector3 Variable")]
|
||||
public class IsoConvertScreenToIsometric : IsoComponentAction<IsoWorld> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoWorld))]
|
||||
[HutongGames.PlayMaker.Title("IsoWorld (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("The IsoWorld for convertation.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Screen Vector (In)")]
|
||||
public FsmVector2 screenVector;
|
||||
|
||||
[HutongGames.PlayMaker.Title("Specific Isometric Z (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific Isometric Z or 0.0f for 'None'")]
|
||||
public FsmFloat specificIsometricZ;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Isometric Vector (Out)")]
|
||||
public FsmVector3 storeIsometricVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Isometric X (Out)")]
|
||||
public FsmFloat storeIsometricX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Isometric Y (Out)")]
|
||||
public FsmFloat storeIsometricY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Isometric Z (Out)")]
|
||||
public FsmFloat storeIsometricZ;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
screenVector = null;
|
||||
specificIsometricZ = 0.0f;
|
||||
storeIsometricVector = null;
|
||||
storeIsometricX = null;
|
||||
storeIsometricY = null;
|
||||
storeIsometricZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = specificIsometricZ.IsNone
|
||||
? isoWorld.ScreenToIso(screenVector.Value)
|
||||
: isoWorld.ScreenToIso(screenVector.Value, specificIsometricZ.Value);
|
||||
storeIsometricVector.Value = value;
|
||||
storeIsometricX.Value = value.x;
|
||||
storeIsometricY.Value = value.y;
|
||||
storeIsometricZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 693a3d4871bd64c19a94cce4a562f96a
|
||||
timeCreated: 1450193231
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
47
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetDrag.cs
Normal file
47
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetDrag.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets the Drag of a IsoRigidbody and stores it in a Float Variable.")]
|
||||
public class IsoGetDrag : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat storeResult;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
storeResult = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
storeResult.Value = isoRigidbody.drag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetDrag.cs.meta
Normal file
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetDrag.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b325fb1bc25fa4247b1102fe5ca8aa13
|
||||
timeCreated: 1450621080
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
47
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetMass.cs
Normal file
47
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetMass.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets the Mass of a IsoRigidbody and stores it in a Float Variable.")]
|
||||
public class IsoGetMass : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat storeResult;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
storeResult = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
storeResult.Value = isoRigidbody.mass;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetMass.cs.meta
Normal file
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetMass.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: daefced600ce84c6a955e1697b458114
|
||||
timeCreated: 1450621053
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,80 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets a mouse isometric position.")]
|
||||
public class IsoGetMouseIsoPosition : IsoComponentAction<IsoWorld> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoWorld))]
|
||||
[HutongGames.PlayMaker.Title("IsoWorld (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[CheckForComponent(typeof(Camera))]
|
||||
[HutongGames.PlayMaker.Title("Camera (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific camera or main camera for 'None'.")]
|
||||
public FsmGameObject camera;
|
||||
|
||||
[HutongGames.PlayMaker.Title("Specific Isometric Z (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific Isometric Z or 0.0f for 'None'")]
|
||||
public FsmFloat specificIsometricZ;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position (Out)")]
|
||||
public FsmVector3 storeVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position X (Out)")]
|
||||
public FsmFloat storeX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position Y (Out)")]
|
||||
public FsmFloat storeY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position Z (Out)")]
|
||||
public FsmFloat storeZ;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
camera = null;
|
||||
specificIsometricZ = null;
|
||||
storeVector = null;
|
||||
storeX = null;
|
||||
storeY = null;
|
||||
storeZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoWorld.MouseIsoPosition(
|
||||
camera.IsNone ? Camera.main : camera.Value.GetComponent<Camera>(),
|
||||
specificIsometricZ.IsNone ? 0.0f : specificIsometricZ.Value);
|
||||
storeVector.Value = value;
|
||||
storeX.Value = value.x;
|
||||
storeY.Value = value.y;
|
||||
storeZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2dffeb7d382404baa9daf01f1da629a1
|
||||
timeCreated: 1450288005
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,80 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets a mouse isometric tile position.")]
|
||||
public class IsoGetMouseIsoTilePosition : IsoComponentAction<IsoWorld> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoWorld))]
|
||||
[HutongGames.PlayMaker.Title("IsoWorld (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[CheckForComponent(typeof(Camera))]
|
||||
[HutongGames.PlayMaker.Title("Camera (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific camera or main camera for 'None'.")]
|
||||
public FsmGameObject camera;
|
||||
|
||||
[HutongGames.PlayMaker.Title("Specific Isometric Z (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific Isometric Z or 0.0f for 'None'")]
|
||||
public FsmFloat specificIsometricZ;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position (Out)")]
|
||||
public FsmVector3 storeVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position X (Out)")]
|
||||
public FsmFloat storeX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position Y (Out)")]
|
||||
public FsmFloat storeY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position Z (Out)")]
|
||||
public FsmFloat storeZ;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
camera = null;
|
||||
specificIsometricZ = null;
|
||||
storeVector = null;
|
||||
storeX = null;
|
||||
storeY = null;
|
||||
storeZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoWorld.MouseIsoTilePosition(
|
||||
camera.IsNone ? Camera.main : camera.Value.GetComponent<Camera>(),
|
||||
specificIsometricZ.IsNone ? 0.0f : specificIsometricZ.Value);
|
||||
storeVector.Value = value;
|
||||
storeX.Value = value.x;
|
||||
storeY.Value = value.y;
|
||||
storeZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52e132a4a0d844bbd84f8b1fbd61aa12
|
||||
timeCreated: 1450288016
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
68
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetPosition.cs
Normal file
68
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetPosition.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets the Position of a IsoObject and stores it " +
|
||||
"in a Vector3 Variable or each Axis in a Float Variable")]
|
||||
public class IsoGetPosition : IsoComponentAction<IsoObject> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoObject))]
|
||||
[HutongGames.PlayMaker.Title("IsoObject (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position Vector (Out)")]
|
||||
public FsmVector3 storeVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position X (Out)")]
|
||||
public FsmFloat storeX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position Y (Out)")]
|
||||
public FsmFloat storeY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position Z (Out)")]
|
||||
public FsmFloat storeZ;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
storeVector = null;
|
||||
storeX = null;
|
||||
storeY = null;
|
||||
storeZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoObject.position;
|
||||
storeVector.Value = value;
|
||||
storeX.Value = value.x;
|
||||
storeY.Value = value.y;
|
||||
storeZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c611ab0e954f04d81bb71728da293513
|
||||
timeCreated: 1450001517
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,40 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets the Renderers Mode of a IsoObject and stores it in a Enum Variable")]
|
||||
public class IsoGetMode : IsoComponentAction<IsoObject> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoObject))]
|
||||
[HutongGames.PlayMaker.Title("IsoObject (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[ObjectType(typeof(IsoObject.RenderersMode))]
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Renderers Mode (Out)")]
|
||||
public FsmEnum storeRenderersMode;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
storeRenderersMode = null;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
Finish();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
storeRenderersMode.Value = isoObject.renderersMode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee5d31a178d81452ea41e5945bdec367
|
||||
timeCreated: 1450021857
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
68
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetSize.cs
Normal file
68
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetSize.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets the Size of a IsoObject and stores it " +
|
||||
"in a Vector3 Variable or each Axis in a Float Variable")]
|
||||
public class IsoGetSize : IsoComponentAction<IsoObject> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoObject))]
|
||||
[HutongGames.PlayMaker.Title("IsoObject (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Size Vector (Out)")]
|
||||
public FsmVector3 storeVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Size X (Out)")]
|
||||
public FsmFloat storeX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Size Y (Out)")]
|
||||
public FsmFloat storeY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Size Z (Out)")]
|
||||
public FsmFloat storeZ;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
storeVector = null;
|
||||
storeX = null;
|
||||
storeY = null;
|
||||
storeZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoObject.size;
|
||||
storeVector.Value = value;
|
||||
storeX.Value = value.x;
|
||||
storeY.Value = value.y;
|
||||
storeZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetSize.cs.meta
Normal file
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetSize.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 786db15115e7f4363b18ae4aadcf2e3b
|
||||
timeCreated: 1450014652
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
47
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetSpeed.cs
Normal file
47
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetSpeed.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets the Speed of a IsoRigidbody and stores it in a Float Variable.")]
|
||||
public class IsoGetSpeed : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat storeResult;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
storeResult = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
storeResult.Value = isoRigidbody.velocity.magnitude;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetSpeed.cs.meta
Normal file
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetSpeed.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47bdbba00b58348cd9376287604f29ce
|
||||
timeCreated: 1450620446
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,68 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets the TilePosition of a IsoObject and stores it " +
|
||||
"in a Vector3 Variable or each Axis in a Float Variable")]
|
||||
public class IsoGetTilePosition : IsoComponentAction<IsoObject> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoObject))]
|
||||
[HutongGames.PlayMaker.Title("IsoObject (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position Vector (Out)")]
|
||||
public FsmVector3 storeVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position X (Out)")]
|
||||
public FsmFloat storeX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position Y (Out)")]
|
||||
public FsmFloat storeY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position Z (Out)")]
|
||||
public FsmFloat storeZ;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
storeVector = null;
|
||||
storeX = null;
|
||||
storeY = null;
|
||||
storeZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoObject.tilePosition;
|
||||
storeVector.Value = value;
|
||||
storeX.Value = value.x;
|
||||
storeY.Value = value.y;
|
||||
storeZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4c5cff4e06894f2aae07daa307c76d9
|
||||
timeCreated: 1450207773
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets a touch isometric position.")]
|
||||
public class IsoGetTouchIsoPosition : IsoComponentAction<IsoWorld> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoWorld))]
|
||||
[HutongGames.PlayMaker.Title("IsoWorld (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[HutongGames.PlayMaker.Title("Finger Id (In)")]
|
||||
public FsmInt fingerId;
|
||||
|
||||
[CheckForComponent(typeof(Camera))]
|
||||
[HutongGames.PlayMaker.Title("Camera (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific camera or main camera for 'None'.")]
|
||||
public FsmGameObject camera;
|
||||
|
||||
[HutongGames.PlayMaker.Title("Specific Isometric Z (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific Isometric Z or 0.0f for 'None'")]
|
||||
public FsmFloat specificIsometricZ;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position (Out)")]
|
||||
public FsmVector3 storeVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position X (Out)")]
|
||||
public FsmFloat storeX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position Y (Out)")]
|
||||
public FsmFloat storeY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Position Z (Out)")]
|
||||
public FsmFloat storeZ;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
fingerId = null;
|
||||
camera = null;
|
||||
specificIsometricZ = null;
|
||||
storeVector = null;
|
||||
storeX = null;
|
||||
storeY = null;
|
||||
storeZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoWorld.TouchIsoPosition(
|
||||
fingerId.Value,
|
||||
camera.IsNone ? Camera.main : camera.Value.GetComponent<Camera>(),
|
||||
specificIsometricZ.IsNone ? 0.0f : specificIsometricZ.Value);
|
||||
storeVector.Value = value;
|
||||
storeX.Value = value.x;
|
||||
storeY.Value = value.y;
|
||||
storeZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88c45e14a4cd040f992be5868786242f
|
||||
timeCreated: 1450196704
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets a touch isometric tile position.")]
|
||||
public class IsoGetTouchIsoTilePosition : IsoComponentAction<IsoWorld> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoWorld))]
|
||||
[HutongGames.PlayMaker.Title("IsoWorld (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
[HutongGames.PlayMaker.Title("Finger Id (In)")]
|
||||
public FsmInt fingerId;
|
||||
|
||||
[CheckForComponent(typeof(Camera))]
|
||||
[HutongGames.PlayMaker.Title("Camera (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific camera or main camera for 'None'.")]
|
||||
public FsmGameObject camera;
|
||||
|
||||
[HutongGames.PlayMaker.Title("Specific Isometric Z (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("Specific Isometric Z or 0.0f for 'None'")]
|
||||
public FsmFloat specificIsometricZ;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position (Out)")]
|
||||
public FsmVector3 storeVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position X (Out)")]
|
||||
public FsmFloat storeX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position Y (Out)")]
|
||||
public FsmFloat storeY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Store Tile Position Z (Out)")]
|
||||
public FsmFloat storeZ;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
fingerId = null;
|
||||
camera = null;
|
||||
specificIsometricZ = null;
|
||||
storeVector = null;
|
||||
storeX = null;
|
||||
storeY = null;
|
||||
storeZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoWorld.TouchIsoTilePosition(
|
||||
fingerId.Value,
|
||||
camera.IsNone ? Camera.main : camera.Value.GetComponent<Camera>(),
|
||||
specificIsometricZ.IsNone ? 0.0f : specificIsometricZ.Value);
|
||||
storeVector.Value = value;
|
||||
storeX.Value = value.x;
|
||||
storeY.Value = value.y;
|
||||
storeZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91eb63755433a4241b6cdf806e27a493
|
||||
timeCreated: 1450196722
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
63
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetVelocity.cs
Normal file
63
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetVelocity.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets the Velocity of a IsoRigidbody and stores it " +
|
||||
"in a Vector3 Variable or each Axis in a Float Variable")]
|
||||
public class IsoGetVelocity : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmVector3 storeVector;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat storeX;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat storeY;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmFloat storeZ;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
storeVector = null;
|
||||
storeX = null;
|
||||
storeY = null;
|
||||
storeZ = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoRigidbody.velocity;
|
||||
storeVector.Value = value;
|
||||
storeX.Value = value.x;
|
||||
storeY.Value = value.y;
|
||||
storeZ.Value = value.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea8962e92212e431ba4e354fbb0ff3e3
|
||||
timeCreated: 1450619756
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
78
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetWorldProps.cs
Normal file
78
Assets/IsoTools/Addons/PlayMaker/Actions/IsoGetWorldProps.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Gets an options of a IsoWorld.")]
|
||||
public class IsoGetWorldProps : IsoComponentAction<IsoWorld> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoWorld))]
|
||||
[HutongGames.PlayMaker.Title("IsoWorld (In)")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Tile Size (Out)")]
|
||||
public FsmFloat tileSize;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Tile Ratio (Out)")]
|
||||
public FsmFloat tileRatio;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Tile Angle (Out)")]
|
||||
public FsmFloat tileAngle;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Tile Height (Out)")]
|
||||
public FsmFloat tileHeight;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Step Depth (Out)")]
|
||||
public FsmFloat stepDepth;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Start Depth (Out)")]
|
||||
public FsmFloat startDepth;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
tileSize = null;
|
||||
tileRatio = null;
|
||||
tileAngle = null;
|
||||
tileHeight = null;
|
||||
stepDepth = null;
|
||||
startDepth = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
tileSize.Value = isoWorld.tileSize;
|
||||
tileRatio.Value = isoWorld.tileRatio;
|
||||
tileAngle.Value = isoWorld.tileAngle;
|
||||
tileHeight.Value = isoWorld.tileHeight;
|
||||
stepDepth.Value = isoWorld.stepDepth;
|
||||
startDepth.Value = isoWorld.startDepth;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 571909e63f3954244b08fd7338e68605
|
||||
timeCreated: 1450110259
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
53
Assets/IsoTools/Addons/PlayMaker/Actions/IsoIsKinematic.cs
Normal file
53
Assets/IsoTools/Addons/PlayMaker/Actions/IsoIsKinematic.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Tests if a IsoRigidbody is kinematic.")]
|
||||
public class IsoIsKinematic : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
public FsmEvent trueEvent;
|
||||
public FsmEvent falseEvent;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmBool storeResult;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
trueEvent = null;
|
||||
falseEvent = null;
|
||||
storeResult = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoRigidbody.isKinematic;
|
||||
storeResult.Value = value;
|
||||
Fsm.Event(value ? trueEvent : falseEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98f632c63797046b1a8f1898d00bc756
|
||||
timeCreated: 1450621255
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
53
Assets/IsoTools/Addons/PlayMaker/Actions/IsoIsSleeping.cs
Normal file
53
Assets/IsoTools/Addons/PlayMaker/Actions/IsoIsSleeping.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Tests if a IsoRigidbody is sleeping.")]
|
||||
public class IsoIsSleeping : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
public FsmEvent trueEvent;
|
||||
public FsmEvent falseEvent;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmBool storeResult;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
trueEvent = null;
|
||||
falseEvent = null;
|
||||
storeResult = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoRigidbody.IsSleeping();
|
||||
storeResult.Value = value;
|
||||
Fsm.Event(value ? trueEvent : falseEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57163cba226bd4f199a950f56d1f2a5c
|
||||
timeCreated: 1450621269
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
53
Assets/IsoTools/Addons/PlayMaker/Actions/IsoIsUseGravity.cs
Normal file
53
Assets/IsoTools/Addons/PlayMaker/Actions/IsoIsUseGravity.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Tests if a IsoRigidbody use gravity.")]
|
||||
public class IsoIsUseGravity : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
public FsmEvent trueEvent;
|
||||
public FsmEvent falseEvent;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
public FsmBool storeResult;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
trueEvent = null;
|
||||
falseEvent = null;
|
||||
storeResult = null;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = isoRigidbody.useGravity;
|
||||
storeResult.Value = value;
|
||||
Fsm.Event(value ? trueEvent : falseEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc13998ebfe99487a9e042a27adb3d18
|
||||
timeCreated: 1450621205
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
107
Assets/IsoTools/Addons/PlayMaker/Actions/IsoResize.cs
Normal file
107
Assets/IsoTools/Addons/PlayMaker/Actions/IsoResize.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Resizes a IsoObject. " +
|
||||
"Use a Vector3 variable and/or XYZ components. " +
|
||||
"To leave any axis unchanged, set variable to 'None'.")]
|
||||
public class IsoResize : IsoComponentAction<IsoObject> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoObject))]
|
||||
[HutongGames.PlayMaker.Title("IsoObject (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip("The IsoObject to resize.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Title("Vector (In)")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Use a stored resize Vector3, " +
|
||||
"and/or set individual axis below.")]
|
||||
public FsmVector3 vector;
|
||||
|
||||
[HutongGames.PlayMaker.Title("X (In)")]
|
||||
public FsmFloat x;
|
||||
|
||||
[HutongGames.PlayMaker.Title("Y (In)")]
|
||||
public FsmFloat y;
|
||||
|
||||
[HutongGames.PlayMaker.Title("Z (In)")]
|
||||
public FsmFloat z;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Resize over one second")]
|
||||
public bool perSecond;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Perform the resize in LateUpdate.")]
|
||||
public bool lateUpdate;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Perform the resize in FixedUpdate.")]
|
||||
public bool fixedUpdate;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
vector = null;
|
||||
x = new FsmFloat{UseVariable = true};
|
||||
y = new FsmFloat{UseVariable = true};
|
||||
z = new FsmFloat{UseVariable = true};
|
||||
perSecond = true;
|
||||
everyFrame = true;
|
||||
lateUpdate = false;
|
||||
fixedUpdate = false;
|
||||
}
|
||||
|
||||
public override void OnPreprocess() {
|
||||
Fsm.HandleFixedUpdate = true;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
if ( !everyFrame && !lateUpdate && !fixedUpdate ) {
|
||||
DoAction();
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
if ( !lateUpdate && !fixedUpdate ) {
|
||||
DoAction();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnLateUpdate() {
|
||||
if ( lateUpdate ) {
|
||||
DoAction();
|
||||
}
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate() {
|
||||
if ( fixedUpdate ) {
|
||||
DoAction();
|
||||
}
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = vector.IsNone ? Vector3.zero : vector.Value;
|
||||
if ( !x.IsNone ) { value.x = x.Value; }
|
||||
if ( !y.IsNone ) { value.y = y.Value; }
|
||||
if ( !z.IsNone ) { value.z = z.Value; }
|
||||
isoObject.size +=
|
||||
perSecond ? value * Time.deltaTime : value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoResize.cs.meta
Normal file
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoResize.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cc9c814428694df6a2a04949e881f7b
|
||||
timeCreated: 1450019890
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
46
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetDrag.cs
Normal file
46
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetDrag.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Sets the Drag of a IsoRigidbody.")]
|
||||
public class IsoSetDrag : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
public FsmFloat drag;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
drag = 1.0f;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
isoRigidbody.drag = drag.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetDrag.cs.meta
Normal file
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetDrag.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f83d153bf736469ca580e60ea2ca79c
|
||||
timeCreated: 1450621092
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,37 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Sets the IsKinematic of a IsoRigidbody.")]
|
||||
public class IsoSetIsKinematic : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
public FsmBool isKinematic;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
isKinematic = true;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
Finish();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
isoRigidbody.isKinematic = isKinematic.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd8b09a582b9846e79c50485090f3fe3
|
||||
timeCreated: 1450622310
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
46
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetMass.cs
Normal file
46
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetMass.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using IsoTools.Physics;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools.Physics")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Sets the Mass of a IsoRigidbody.")]
|
||||
public class IsoSetMass : IsoComponentAction<IsoRigidbody> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoRigidbody))]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[RequiredField]
|
||||
public FsmFloat mass;
|
||||
|
||||
public bool everyFrame;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
mass = 1.0f;
|
||||
everyFrame = false;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
DoAction();
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
DoAction();
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
isoRigidbody.mass = mass.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetMass.cs.meta
Normal file
12
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetMass.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cabad94a5a31c4d3ba9c52a4929937a4
|
||||
timeCreated: 1450621064
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
94
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetPosition.cs
Normal file
94
Assets/IsoTools/Addons/PlayMaker/Actions/IsoSetPosition.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
#if PLAYMAKER
|
||||
using UnityEngine;
|
||||
using HutongGames.PlayMaker;
|
||||
using IsoTools.PlayMaker.Internal;
|
||||
|
||||
namespace IsoTools.PlayMaker.Actions {
|
||||
[ActionCategory("IsoTools")]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Sets the Position of a IsoObject. " +
|
||||
"To leave any axis unchanged, set variable to 'None'.")]
|
||||
public class IsoSetPosition : IsoComponentAction<IsoObject> {
|
||||
[RequiredField]
|
||||
[CheckForComponent(typeof(IsoObject))]
|
||||
[HutongGames.PlayMaker.Tooltip("The IsoObject to position.")]
|
||||
public FsmOwnerDefault gameObject;
|
||||
|
||||
[UIHint(UIHint.Variable)]
|
||||
[HutongGames.PlayMaker.Tooltip(
|
||||
"Use a stored Vector3 position, " +
|
||||
"and/or set individual axis below.")]
|
||||
public FsmVector3 vector;
|
||||
|
||||
public FsmFloat x;
|
||||
public FsmFloat y;
|
||||
public FsmFloat z;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Repeat every frame.")]
|
||||
public bool everyFrame;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Perform in LateUpdate.")]
|
||||
public bool lateUpdate;
|
||||
|
||||
[HutongGames.PlayMaker.Tooltip("Perform in FixedUpdate.")]
|
||||
public bool fixedUpdate;
|
||||
|
||||
public override void Reset() {
|
||||
gameObject = null;
|
||||
vector = null;
|
||||
x = new FsmFloat{UseVariable = true};
|
||||
y = new FsmFloat{UseVariable = true};
|
||||
z = new FsmFloat{UseVariable = true};
|
||||
everyFrame = false;
|
||||
lateUpdate = false;
|
||||
fixedUpdate = false;
|
||||
}
|
||||
|
||||
public override void OnPreprocess() {
|
||||
Fsm.HandleFixedUpdate = true;
|
||||
}
|
||||
|
||||
public override void OnEnter() {
|
||||
if ( !everyFrame && !lateUpdate && !fixedUpdate ) {
|
||||
DoAction();
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnUpdate() {
|
||||
if ( !lateUpdate && !fixedUpdate ) {
|
||||
DoAction();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnLateUpdate() {
|
||||
if ( lateUpdate ) {
|
||||
DoAction();
|
||||
}
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate() {
|
||||
if ( fixedUpdate ) {
|
||||
DoAction();
|
||||
}
|
||||
if ( !everyFrame ) {
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction() {
|
||||
var go = Fsm.GetOwnerDefaultTarget(gameObject);
|
||||
if ( UpdateCache(go) ) {
|
||||
var value = vector.IsNone ? isoObject.position : vector.Value;
|
||||
if ( !x.IsNone ) { value.x = x.Value; }
|
||||
if ( !y.IsNone ) { value.y = y.Value; }
|
||||
if ( !z.IsNone ) { value.z = z.Value; }
|
||||
isoObject.position = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f97bd76983db64be3adc438575153e6e
|
||||
timeCreated: 1450001531
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user