205 Commits

Author SHA1 Message Date
BlackMATov
7562afc37f new promo images 2020-10-25 23:51:15 +07:00
BlackMATov
772b3c7fc6 Unity 2017.4.40f1 2020-10-25 22:14:05 +07:00
BlackMATov
b175720fe1 update README 2020-10-25 22:13:37 +07:00
eab56615bc fix for Unity 2019 2019-04-24 22:32:11 +07:00
3c029384b8 todo 2019-03-22 19:50:27 +07:00
0a3b85aef7 todo and changelog 2018-11-27 18:20:39 +07:00
d4de46f747 Fix incorrect sorting after Undo in Editor mode 2018-11-27 18:14:11 +07:00
3bc2e45e0e upgrade to 2017.4.13f1 2018-10-30 14:08:23 +07:00
454477a910 upgrade to 5.6.6f2 2018-10-26 01:23:41 +07:00
4f5197c138 readme limitations 2018-08-31 12:01:20 +07:00
b7798b3ce0 gitignore 2018-02-04 00:57:42 +07:00
e7743e0b23 todo and changelog 2018-02-04 00:46:51 +07:00
9611419aca Speed up debug gizmos render 2018-01-03 00:33:02 +07:00
82b2ef048c Disable iso object snapping by children 2018-01-02 04:32:56 +07:00
17a5f3461b Return scale and rotation by warning detection 2018-01-02 03:32:39 +07:00
5598188257 Fix Unity 5.6 warning 2018-01-02 02:23:44 +07:00
f63205fcfb icons 2018-01-01 20:04:54 +07:00
f4ff267bc8 todo 2017-09-26 22:49:46 +07:00
c15b554759 Added tag 3.0.2 review for changeset 8fafaddba513 2017-06-22 04:43:58 +07:00
20a3c5af59 remove tiled map 2017-06-22 04:41:37 +07:00
5835494ebc physics settings in IsoWorld! 2017-06-22 04:38:51 +07:00
696984fb06 todo 2017-06-18 21:10:51 +07:00
5127b83dc4 todo 2017-04-08 01:19:15 +07:00
16a671cba5 dummy scene10 for future tiled map support 2017-03-27 02:29:19 +07:00
3b39893d39 tiled map base64 to xml 2017-03-27 02:23:15 +07:00
4d7b8a0e7a add TiledMaps for tests 2017-03-27 02:07:41 +07:00
6121483d21 move Promo. add org-mode todo. 2017-03-27 00:21:47 +07:00
d636b19119 Added tag 3.0.1 review for changeset da74c01f4872 2017-03-16 17:22:20 +07:00
63f5ccff61 3.0.1 changelog 2017-03-16 17:21:58 +07:00
ed980cfbd8 fix serialization generic classes problem 2017-03-16 17:16:03 +07:00
ac8a1a670d emacs projectile 2017-03-15 02:00:49 +07:00
33bc36687d Added tag 3.0.0 review for changeset 39f5ec8c19e7 2017-03-15 02:00:24 +07:00
97db117b84 store tools ignore 2017-02-18 03:28:40 +07:00
d3ee8394f7 fix PlayMaker actions 2017-02-18 03:16:15 +07:00
5a68df63b2 drop older unity versions 2017-02-18 03:02:28 +07:00
9eaf2733dc build settings 2017-02-18 02:01:38 +07:00
736891754b update readme, changelog and remove old scenes 2017-02-18 01:35:12 +07:00
b407ff13de move tiled support to old 2017-02-17 23:45:24 +07:00
4dbdfd04b2 fix licence files 2017-01-02 15:51:32 +07:00
0d7ab882e5 fix licence files 2017-01-02 04:05:25 +07:00
badbb0a53c fix false warnings 2017-01-01 02:45:59 +07:00
7be90fa61a reset dev settings of world 2016-12-31 03:42:09 +07:00
f0b7f3165c snapping distance to world settings 2016-12-31 02:35:28 +07:00
26dbd35324 fix old mode properties 2016-12-31 00:43:53 +07:00
df7838dd52 warning solver dummy 2016-12-30 21:31:06 +07:00
f0ff0b16f8 fix problem with disable/enable IsoObject in play mode 2016-12-30 16:37:06 +07:00
336e2aecb9 remove process instances 2016-12-30 02:02:47 +07:00
6e15ee2d45 name refactor 2016-12-29 07:11:48 +07:00
70a28c743d fix problem with removing chached renderer 2016-12-29 01:49:15 +07:00
f1a3025d44 quadtree with id for his item 2016-12-29 00:29:23 +07:00
6afa1e24f6 little renaming 2016-12-28 23:39:46 +07:00
c6de29bd5a External IItem for QuadTree 2016-12-27 19:29:32 +07:00
7c40167da8 remove moving to deep for every new node 2016-12-27 15:38:22 +07:00
1c0a66cd01 quad tree improvements 2016-12-27 06:50:31 +07:00
8f997be60d micro optimizations 2016-12-27 05:52:34 +07:00
10a33b001c remove screen grid 2016-12-27 04:04:40 +07:00
bebe8644ef fix scene view sorting 2016-12-27 00:34:51 +07:00
3e9c6a8377 move performance with quad tree 2016-12-26 02:26:39 +07:00
864727a50d quad tree for visibility wip 2016-12-25 14:56:41 +07:00
a7f4fee821 fix isogrid float problems 2016-12-24 17:50:44 +07:00
486c95f9cd + IsoPoint2 2016-12-24 14:24:38 +07:00
af5077a96d move grid logic from screen solver to IsoGrid.cs 2016-12-24 04:41:02 +07:00
72c0850445 IsoWorld refactoring wip 2016-12-23 03:28:07 +07:00
780d0391aa begin isoworld refactoring 2016-12-22 23:53:35 +07:00
9bef427c5f hide private variables from IsoWorld %) 2016-12-21 23:24:24 +07:00
f3ed1f3236 dirty only not overriden prefab properties. fix missed cached transform in IsoObject. 2016-12-21 03:24:59 +07:00
a0ec6a93eb snapping fix 2016-12-20 03:34:17 +07:00
cc08f1e2c7 fix detached inspector 2016-12-19 03:29:05 +07:00
985274a710 fix scenes to new isoworld child/parent system 2016-12-19 03:01:47 +07:00
fde18817fa Merge 2016-12-19 02:32:19 +07:00
236e72d879 multiple worlds support done 2016-12-19 02:30:30 +07:00
c5084b1596 IsoHolder and IsoInstance improvements 2016-12-18 19:40:28 +07:00
d3016c5603 multiple world wip 2016-12-17 19:08:58 +07:00
204960372a + editor utils 2016-12-17 19:08:04 +07:00
93b11c5ea0 AssignTo for IsoList's 2016-12-17 14:54:56 +07:00
afd19224bb add snapping check box 2016-12-15 13:09:03 +07:00
2d6f8d37f6 safe way for add/remove objects of world 2016-12-15 12:59:47 +07:00
2ff0b86135 gizmos properties to isoworld 2016-12-15 01:12:05 +07:00
b79a1adcd4 debug show depends 2016-12-15 00:40:17 +07:00
fc6fac0ea2 QuadTree WIP 2016-12-11 15:03:52 +07:00
8cff61ae91 little refactor 2016-12-11 13:32:21 +07:00
d74728b4df refactoring process 2016-12-07 18:41:45 +07:00
d1fecf808e remove IsoRigidbody.useConeFriction because it's not supported in Unity 5.5 2016-12-07 02:08:21 +07:00
2a8a48d360 hide fake components from Component/Scripts 2016-11-30 13:37:13 +07:00
1627bf4f54 5.4 prefabs 2016-11-30 12:12:00 +07:00
ef85079c64 fix big number raycast hit cout 2016-11-30 01:29:27 +07:00
eb533aa868 chached transfrom for isoobject changes 2016-11-29 23:40:34 +07:00
9e21f078ed 5.4 prefabs 2016-11-29 23:29:33 +07:00
bdb2fdc489 fix canvas in examples 2016-11-29 00:10:42 +07:00
475d3ece51 TiledMap example to common example's folder 2016-11-27 15:23:23 +07:00
931e0267d9 fixed PlayMaker support for IsoPhysics 2016-11-27 14:37:42 +07:00
26b4f8e7a6 style fixes 2016-11-27 12:32:51 +07:00
b3922d5cfe more functions for IsoPhysics 2016-11-27 11:18:17 +07:00
0746be1275 physics to addons 2016-11-27 05:51:32 +07:00
49a78c0d3f physics to addons 2016-11-27 05:47:38 +07:00
dddd778c34 style fixes 2016-11-27 02:55:43 +07:00
219799c404 micro optimizations 2016-11-26 22:30:27 +07:00
71b609a6c8 style fixes 2016-11-26 16:37:59 +07:00
521c0d2ff2 micro optimizations 2016-11-26 03:57:59 +07:00
e1c09e4552 userprefs to hgignore 2016-11-26 02:15:14 +07:00
184c903381 little fixes 2016-11-25 14:57:17 +07:00
49ef44273e to 5.4 2016-11-25 03:10:43 +07:00
2493ffe382 ignore generated project 2016-11-25 03:01:08 +07:00
302b0fdd25 fix 5.4 physics warning 2016-11-25 03:00:49 +07:00
22edab4e2a create mesh for tiled map without any not default settings 2016-11-25 03:00:19 +07:00
8227a29a22 remove generated project 2016-11-25 00:44:09 +07:00
14c5ab487c prefabs for new sample 2016-10-23 00:59:52 +07:00
c0c29b64c3 dummy scene for new sample 2016-10-22 21:52:17 +07:00
406a05675c dragosha prefabs to separate folder 2016-10-22 21:41:41 +07:00
88317b80f1 лицензии на арт 2016-10-22 21:29:27 +07:00
5a5dabf882 top-down сэмпл 2016-10-22 21:15:53 +07:00
83ced8f772 example script to separate folders 2016-10-22 18:18:27 +07:00
4326c80a68 Prefabs/Tests to Prefabs/Simple 2016-10-22 17:42:29 +07:00
f51d88e355 PlayMaker and Tiled to Addons folder. CHANGELOG and README to Docs folder. 2016-10-22 17:21:00 +07:00
890e54f1b0 remove playmaker defines from project settings 2016-10-22 16:50:30 +07:00
e6ba2d8eb2 extract play maker from package 2016-10-22 16:47:21 +07:00
94dc2fa581 simple images to separate Simple folder 2016-10-22 16:06:31 +07:00
6c0e843b7f + social promo image 2016-10-20 03:37:55 +07:00
eadc44f9f1 dragosha tilesets, new empty example scene 2016-10-18 00:12:31 +07:00
b6a0f5c043 + promo art for store page 2016-10-18 00:04:12 +07:00
999685cf1a Added tag 2.4.2 review for changeset 262407bde179 2016-09-06 22:18:57 +07:00
23ce28152c no message 2016-09-06 22:18:28 +07:00
300f2eb8ca separate Tiled layers sorting fix 2016-09-06 22:16:37 +07:00
3bfc07706f + IsoSnappingParent 2016-08-20 19:05:09 +07:00
e80da29acb Added tag 2.4.1 review for changeset 2b85aff34120 2016-07-08 21:40:58 +06:00
0bac02a4a2 2.4.1 2016-07-08 21:31:41 +06:00
c6802b430c fix tile offset bug 2016-06-25 20:00:34 +06:00
4948f4c155 Added tag 2.4 review for changeset 7ae26e12308e 2016-04-29 22:56:26 +06:00
956d516338 editor wrong function fix 2016-04-29 22:56:17 +06:00
b1155d8284 raycast example, readme and changelog 2016-04-29 22:10:49 +06:00
642e508274 raycast ray fix 2016-04-29 03:47:56 +06:00
b261977094 changelog and readme templates 2016-04-28 12:03:00 +06:00
f849ecb529 Raycast from iso camera! 2016-04-27 01:17:20 +06:00
fa022b6f65 little tweek 2016-04-26 20:58:48 +06:00
d53e8caf97 Fix parent move 2016-04-26 02:39:05 +06:00
ff4faec197 float beautifier for editor move 2016-04-25 01:21:27 +06:00
bff9b5ca3a snapping to tile only for one from selection 2016-04-24 23:26:39 +06:00
811466a749 snapping by tiles too 2016-04-24 23:15:41 +06:00
40349a896a snapping first impl 2016-04-24 20:11:37 +06:00
4f33a070d9 Fix player example collider 2016-04-24 00:02:07 +06:00
a0270bf6ff add capsule collider 2016-04-23 03:50:25 +06:00
cdeeea6e4e cache renderers for example prefabs 2016-04-23 00:06:54 +06:00
63949412f0 Added tag 2.3.2 review for changeset 522b14ea0e9d 2016-04-22 02:37:46 +06:00
f9c391aa59 remove second tileset from tiled example 2016-04-22 00:08:40 +06:00
ef5be56a8f unnecessary algo little fix 2016-04-21 12:41:01 +06:00
effb5f7b09 little fixes 2016-04-21 01:55:52 +06:00
3ead69dd27 copy-paste fix 2016-04-21 00:25:00 +06:00
40488f9424 union physic helper holder 2016-04-20 22:56:20 +06:00
92ed826849 begin physic events optimization 2016-04-20 02:34:43 +06:00
a9706465e1 tiled meshes and materials to tiled asset 2016-04-20 01:09:25 +06:00
c21d33cd77 fake colliders and rigidbody to one fakeobject 2016-04-18 23:32:44 +06:00
469f674f69 fix physic layers 2016-04-18 21:39:19 +06:00
27dc8cb35a DontDestroy working with iso physic now 2016-04-18 21:32:13 +06:00
ae568870c9 Destroy physic helper without ref counter 2016-04-18 20:31:28 +06:00
3e5542e38d ref counter for IsoPhysicHelper 2016-04-18 02:24:23 +06:00
7656f3c565 Fix remove IsoObject from scene bug 2016-04-18 01:49:59 +06:00
12e944b068 more physics api 2016-04-17 23:24:22 +06:00
68ca004cbd more rigidbody function 2016-04-17 22:21:38 +06:00
91195b66a6 mass, drag and useGravity to inspector 2016-04-17 20:47:17 +06:00
7c22b52489 IsoWorld static instance 2016-04-17 19:20:43 +06:00
8d5a177eb1 Canvas for examples with next and prev scene button 2016-04-17 18:20:25 +06:00
c1d521e96a new 'cacheRenderers' option for IsoObject 2016-04-17 17:12:29 +06:00
fccf22b3cd Fix collision layers 2016-03-29 02:40:57 +06:00
bdc20eea4b Added tag 2.3.1 review for changeset 6a3f237587cf 2016-03-22 00:59:19 +06:00
d6343af20b back to 5.1.4 again 2016-03-22 00:54:33 +06:00
295cad24e2 back to 5.1.4 2016-03-22 00:43:44 +06:00
4811872cad fix OOM bug 2016-03-21 20:45:57 +06:00
be4ca04e3b code style 2016-02-08 00:55:01 +06:00
17058f859e debug log error to exception 2016-02-08 00:23:45 +06:00
4848b817c7 back to the future (5.3.2) 2016-02-08 00:04:16 +06:00
0ee0153a7a Added tag 2.3 review for changeset c22230eb2352 2016-02-07 18:22:05 +06:00
4c1fcbe92c back to 5.1.4 2016-02-07 17:53:22 +06:00
d434881a88 first tiled iteration done 2016-02-07 17:40:03 +06:00
aa6637bb3d code style 2016-02-07 04:40:36 +06:00
4bf3be6c79 mesh tiled map 2016-02-07 04:21:56 +06:00
9704155e72 empty bounds bug fix 2016-02-07 02:58:26 +06:00
ba02ef7803 create tiled prefab 2016-02-06 17:42:19 +06:00
0ed90de773 PPU for tiled layers 2016-02-06 14:44:06 +06:00
244b672b23 Show grid checkbox. Show properties in inspector. 2016-02-06 02:13:38 +06:00
ba482724d3 IsoUtils little refactor 2016-02-06 00:16:40 +06:00
116fd56174 raw list getter disable 2016-02-05 21:13:33 +06:00
d406548240 performance tricks 2016-02-05 14:00:06 +06:00
13ca62cfdc all to assoc list 2016-02-05 03:06:55 +06:00
a4061b9af0 encapsulate dict and list 2016-02-05 02:13:03 +06:00
8c4b0eccac IsoList for fast Pop 2016-02-05 00:55:03 +06:00
ba1c51fcb7 self depends performance trick 2016-02-04 00:19:08 +06:00
7be576f7b3 remove ended namespace comments 2016-02-03 01:04:15 +06:00
133df2d20e little 3d mode place fix 2016-02-02 23:47:46 +06:00
7297a81dea high performance tricks 2016-02-02 23:06:30 +06:00
fe2092860f duty performance trick 2016-02-02 22:36:58 +06:00
ff36b3f6be CanEditMultipleObject for tiled objects 2016-02-02 20:09:54 +06:00
0ad52b3800 tiled properties wip 2016-02-02 12:32:02 +06:00
17c5ce898e add some tiled properties test 2016-02-02 02:05:09 +06:00
1920b49e47 undo-redo for create tiled map and property holder 2016-02-02 00:21:21 +06:00
46e2e830b5 create tiled map from asset wip 2016-02-01 04:18:37 +06:00
bb6e9994bb fix scenes and prefabs 2016-01-31 20:32:05 +06:00
ca713128cf new unity. empty tile map stuff 2016-01-24 14:47:29 +06:00
1d1f7afb05 loading tiled asset fixes 2016-01-23 22:37:29 +06:00
bd1c518f87 slice tiled textures 2016-01-22 00:13:01 +06:00
af12a9f6e2 parsing tmx data done 2016-01-21 21:20:02 +06:00
944b40b430 Tiled support begined 2016-01-21 02:11:39 +06:00
7bb01a9e7b Fix selected IsoObject prefab 2016-01-19 00:42:35 +06:00
6133140820 IsoObjectEditor to Internal 2016-01-18 20:54:55 +06:00
69401614a6 return to 5.3 2015-12-20 23:27:48 +06:00
31d9787cae Added tag 2.2 review for changeset e363e51546c0 2015-12-20 23:22:04 +06:00
894 changed files with 72953 additions and 31425 deletions

15
.gitignore vendored Normal file
View 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

View File

@@ -1,3 +0,0 @@
glob:obj/*
glob:Temp/*
glob:Library/*

1
.vimrc Normal file
View File

@@ -0,0 +1 @@
let NERDTreeIgnore=['\.meta$']

View File

@@ -1,112 +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_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;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_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;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;UNITY_WEBGL;UNITY_WEBGL_API;ENABLE_TEXTUREID_MAP;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_IL2CPP;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;ENABLE_DUCK_TYPING</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\Editor\IsoObjectEditor.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>

View File

@@ -1,112 +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_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;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_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;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;UNITY_WEBGL;UNITY_WEBGL_API;ENABLE_TEXTUREID_MAP;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_IL2CPP;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;ENABLE_DUCK_TYPING</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\Editor\IsoObjectEditor.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.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>

View File

@@ -1,91 +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_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;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_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;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;UNITY_WEBGL;UNITY_WEBGL_API;ENABLE_TEXTUREID_MAP;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_IL2CPP;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\IsoFakeCollider.cs" />
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeObject.cs" />
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeRigidbody.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" />
<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>

View File

@@ -1,91 +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_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;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_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;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;UNITY_WEBGL;UNITY_WEBGL_API;ENABLE_TEXTUREID_MAP;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_IL2CPP;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\IsoFakeCollider.cs" />
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeObject.cs" />
<Compile Include="Assets\IsoTools\Scripts\Internal\IsoFakeRigidbody.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" />
<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>

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 6d8953476a2b54c21899981284637e40
guid: 90df07b38ec6e4d678babdff7426f98e
folderAsset: yes
timeCreated: 1436704661
timeCreated: 1477130201
licenseType: Free
DefaultImporter:
userData:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8dd47e4d38ef9485586318e48755aff9
folderAsset: yes
timeCreated: 1480174284
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e3a035a6c93424c7a98d81c8cb5aad1c
folderAsset: yes
timeCreated: 1480174340
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,16 +1,18 @@
using UnityEngine;
namespace IsoTools.Internal {
namespace IsoTools.Physics.Internal {
[AddComponentMenu("")]
public class IsoFakeCollider : MonoBehaviour {
IsoCollider _isoCollider = null;
public void Init(IsoCollider iso_collider) {
public IsoFakeCollider Init(IsoCollider iso_collider) {
_isoCollider = iso_collider;
return this;
}
public IsoCollider isoCollider {
get { return _isoCollider; }
}
}
} // namespace IsoTools.Internal
}

View File

@@ -0,0 +1,28 @@
using UnityEngine;
namespace IsoTools.Physics.Internal {
[AddComponentMenu("")]
public class IsoFakeCollisionListener : MonoBehaviour {
GameObject _realGameObject = null;
public IsoFakeCollisionListener Init(IsoCollisionListener iso_listener) {
_realGameObject = iso_listener.gameObject;
return this;
}
void OnCollisionEnter(Collision collision) {
_realGameObject.SendMessage(
"OnIsoCollisionEnter",
new IsoCollision(collision),
SendMessageOptions.DontRequireReceiver);
}
void OnCollisionExit(Collision collision) {
_realGameObject.SendMessage(
"OnIsoCollisionExit",
new IsoCollision(collision),
SendMessageOptions.DontRequireReceiver);
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b3ba702b17e9f4b85aad7b29b1a06eed
timeCreated: 1461097028
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using UnityEngine;
namespace IsoTools.Physics.Internal {
[AddComponentMenu("")]
public class IsoFakeObject : MonoBehaviour {
IsoObject _isoObject = null;
Vector3 _lastPosition = Vector3.zero;
public void Init(IsoObject iso_object) {
_isoObject = iso_object;
_lastPosition = iso_object.position;
transform.position = iso_object.position;
}
public IsoObject isoObject {
get { return _isoObject; }
}
void CheckLayers() {
var iso_object_layer = isoObject.gameObject.layer;
if ( gameObject.layer != iso_object_layer ) {
gameObject.layer = iso_object_layer;
}
}
void FixedUpdate() {
CheckLayers();
if ( _lastPosition != isoObject.position ) {
_lastPosition = transform.position = isoObject.position;
} else if ( _lastPosition != transform.position ) {
_lastPosition = isoObject.position = transform.position;
}
}
}
}

View File

@@ -1,16 +1,18 @@
using UnityEngine;
namespace IsoTools.Internal {
namespace IsoTools.Physics.Internal {
[AddComponentMenu("")]
public class IsoFakeRigidbody : MonoBehaviour {
IsoRigidbody _isoRigidbody = null;
public void Init(IsoRigidbody iso_rigidbody) {
public IsoFakeRigidbody Init(IsoRigidbody iso_rigidbody) {
_isoRigidbody = iso_rigidbody;
return this;
}
public IsoRigidbody isoRigidbody {
get { return _isoRigidbody; }
}
}
} // namespace IsoTools.Internal
}

View File

@@ -0,0 +1,28 @@
using UnityEngine;
namespace IsoTools.Physics.Internal {
[AddComponentMenu("")]
public class IsoFakeTriggerListener : MonoBehaviour {
GameObject _realGameObject = null;
public IsoFakeTriggerListener Init(IsoTriggerListener iso_listener) {
_realGameObject = iso_listener.gameObject;
return this;
}
void OnTriggerEnter(Collider collider) {
_realGameObject.SendMessage(
"OnIsoTriggerEnter",
IsoPhysicsUtils.IsoConvertCollider(collider),
SendMessageOptions.DontRequireReceiver);
}
void OnTriggerExit(Collider collider) {
_realGameObject.SendMessage(
"OnIsoTriggerExit",
IsoPhysicsUtils.IsoConvertCollider(collider),
SendMessageOptions.DontRequireReceiver);
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 85a92cf713a8c4da68454e88e803bbce
timeCreated: 1461097013
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,9 +1,10 @@
using UnityEngine;
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 {
@@ -17,6 +18,7 @@ namespace IsoTools.Internal {
_isoFakeObject = new GameObject("_Fake" + gameObject.name);
_isoFakeObject.AddComponent<IsoFakeObject>().Init(iso_object);
_isoFakeObject.hideFlags = HideFlags.HideInHierarchy | HideFlags.NotEditable;
GameObject.DontDestroyOnLoad(_isoFakeObject);
}
}
@@ -27,4 +29,4 @@ namespace IsoTools.Internal {
}
}
}
} // namespace IsoTools.Internal
}

View File

@@ -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();
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 24e253f6697d448229f535a2e796f72b
timeCreated: 1461163442
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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;
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0d44532ca15804cdc997583d81cf4df1
timeCreated: 1480196616
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -5,7 +5,7 @@ using IsoTools.Internal;
using UnityEditor;
#endif
namespace IsoTools {
namespace IsoTools.Physics {
[RequireComponent(typeof(IsoObject))]
public class IsoBoxCollider : IsoCollider {
@@ -44,12 +44,13 @@ namespace IsoTools {
get { return realCollider as BoxCollider; }
}
#if UNITY_EDITOR
#if UNITY_EDITOR
protected override void Reset() {
base.Reset();
var iso_object = GetComponent<IsoObject>();
size = iso_object ? iso_object.size : Vector3.zero;
offset = iso_object ? iso_object.size * 0.5f : Vector3.zero;
var iso_object = GetComponent<IsoObject>();
var iso_object_size = iso_object ? iso_object.size : Vector3.zero;
size = iso_object_size;
offset = iso_object_size * 0.5f;
EditorUtility.SetDirty(this);
}
@@ -64,13 +65,13 @@ 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,
Color.green);
}
}
#endif
#endif
}
} // namespace IsoTools
}

View File

@@ -0,0 +1,111 @@
using UnityEngine;
using IsoTools.Internal;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace IsoTools.Physics {
[RequireComponent(typeof(IsoObject))]
public class IsoCapsuleCollider : IsoCollider {
[SerializeField]
public float _height = 0.0f;
public float height {
get { return _height; }
set {
_height = value;
if ( realCapsuleCollider ) {
realCapsuleCollider.height = value;
}
}
}
[SerializeField]
public float _radius = 0.0f;
public float radius {
get { return _radius; }
set {
_radius = value;
if ( realCapsuleCollider ) {
realCapsuleCollider.radius = value;
}
}
}
[SerializeField]
public Vector3 _offset = Vector3.zero;
public Vector3 offset {
get { return _offset; }
set {
_offset = value;
if ( realCapsuleCollider ) {
realCapsuleCollider.center = value;
}
}
}
protected override Collider CreateRealCollider(GameObject target) {
var collider = target.AddComponent<CapsuleCollider>();
collider.height = height;
collider.radius = radius;
collider.center = offset;
collider.direction = 2; // z-axis
return collider;
}
public CapsuleCollider realCapsuleCollider {
get { return realCollider as CapsuleCollider; }
}
#if UNITY_EDITOR
protected override void Reset() {
base.Reset();
var iso_object = GetComponent<IsoObject>();
var iso_object_size = iso_object ? iso_object.size : Vector3.zero;
height = iso_object.size.z;
radius = IsoUtils.Vec3MinF(iso_object_size) * 0.5f;
offset = iso_object_size * 0.5f;
EditorUtility.SetDirty(this);
}
protected override void OnValidate() {
base.OnValidate();
if ( realCapsuleCollider ) {
realCapsuleCollider.height = height;
realCapsuleCollider.radius = radius;
realCapsuleCollider.center = offset;
}
}
void OnDrawGizmosSelected() {
var iso_object = GetComponent<IsoObject>();
if ( iso_object && iso_object.isoWorld ) {
if ( radius * 2 < height ) {
IsoUtils.DrawIsoCube(
iso_object.isoWorld,
iso_object.position + offset,
new Vector3(radius * 2.0f, radius * 2.0f, height - radius),
Color.green);
IsoUtils.DrawIsoSphere(
iso_object.isoWorld,
iso_object.position + offset - IsoUtils.Vec3FromZ(height * 0.5f - radius),
radius,
Color.green);
IsoUtils.DrawIsoSphere(
iso_object.isoWorld,
iso_object.position + offset + IsoUtils.Vec3FromZ(height * 0.5f - radius),
radius,
Color.green);
} else {
IsoUtils.DrawIsoSphere(
iso_object.isoWorld,
iso_object.position + offset,
radius,
Color.green);
}
}
}
#endif
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d4d35c70ee62a44288b95ff88ca8e87c
timeCreated: 1461359219
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,25 +1,20 @@
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 : MonoBehaviour {
public abstract class IsoCollider : IsoPhysicsHelperHolder {
protected abstract Collider CreateRealCollider(GameObject target);
Collider _realCollider = null;
protected Collider realCollider {
get { return _realCollider; }
}
IsoFakeCollider _fakeCollider;
protected GameObject fakeObject {
get {
var helper = IsoUtils.GetOrCreateComponent<IsoPhysicHelper>(gameObject);
return helper ? helper.isoFakeObject : null;
}
Collider _realCollider = null;
public Collider realCollider {
get { return _realCollider; }
}
[SerializeField]
@@ -49,7 +44,7 @@ namespace IsoTools {
public IsoRigidbody attachedRigidbody {
get {
return realCollider
? IsoUtils.IsoConvertRigidbody(realCollider.attachedRigidbody)
? IsoPhysicsUtils.IsoConvertRigidbody(realCollider.attachedRigidbody)
: null;
}
}
@@ -62,6 +57,18 @@ namespace IsoTools {
}
}
public float contactOffset {
get {
return realCollider
? realCollider.contactOffset
: 0.0f;
} set {
if ( realCollider ) {
realCollider.contactOffset = value;
}
}
}
public Vector3 ClosestPointOnBounds(Vector3 position) {
return realCollider
? realCollider.ClosestPointOnBounds(position)
@@ -78,10 +85,8 @@ namespace IsoTools {
}
void Awake() {
var fake_collider_go = new GameObject();
fake_collider_go.transform.SetParent(fakeObject.transform, false);
fake_collider_go.AddComponent<IsoFakeCollider>().Init(this);
_realCollider = CreateRealCollider(fake_collider_go);
_fakeCollider = fakeObject.AddComponent<IsoFakeCollider>().Init(this);
_realCollider = CreateRealCollider(fakeObject);
_realCollider.material = material;
_realCollider.isTrigger = isTrigger;
}
@@ -100,12 +105,15 @@ namespace IsoTools {
void OnDestroy() {
if ( _realCollider ) {
Destroy(_realCollider.gameObject);
_realCollider = null;
Destroy(_realCollider);
}
if ( _fakeCollider ) {
Destroy(_fakeCollider);
}
DestroyUnnecessaryCheck();
}
#if UNITY_EDITOR
#if UNITY_EDITOR
protected virtual void Reset() {
material = null;
isTrigger = false;
@@ -116,6 +124,6 @@ namespace IsoTools {
material = _material;
isTrigger = _isTrigger;
}
#endif
#endif
}
} // namespace IsoTools
}

View File

@@ -0,0 +1,23 @@
using UnityEngine;
using IsoTools.Physics.Internal;
namespace IsoTools.Physics {
public class IsoCollision {
public IsoCollider collider { get; private set; }
public IsoContactPoint[] contacts { get; private set; }
public GameObject gameObject { get; private set; }
public Vector3 impulse { get; private set; }
public Vector3 relativeVelocity { get; private set; }
public IsoRigidbody rigidbody { get; private set; }
public IsoCollision(Collision collision) {
collider = IsoPhysicsUtils.IsoConvertCollider(collision.collider);
contacts = IsoPhysicsUtils.IsoConvertContactPoints(collision.contacts);
gameObject = IsoPhysicsUtils.IsoConvertGameObject(collision.gameObject);
impulse = collision.impulse;
relativeVelocity = collision.relativeVelocity;
rigidbody = IsoPhysicsUtils.IsoConvertRigidbody(collision.rigidbody);
}
}
}

View File

@@ -0,0 +1,22 @@
using UnityEngine;
using IsoTools.Physics.Internal;
namespace IsoTools.Physics {
[DisallowMultipleComponent]
[RequireComponent(typeof(IsoObject))]
public class IsoCollisionListener : IsoPhysicsHelperHolder {
IsoFakeCollisionListener _fakeListener;
void Awake() {
_fakeListener = fakeObject.AddComponent<IsoFakeCollisionListener>().Init(this);
}
void OnDestroy() {
if ( _fakeListener ) {
Destroy(_fakeListener);
}
DestroyUnnecessaryCheck();
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c9634e461d1e942de8174ee80528a2d3
timeCreated: 1461096905
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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);
}
}
} // namespace IsoTools
}

View 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;
}
}
}

View 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:

View File

@@ -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);
}
}
} // namespace IsoTools
}

View File

@@ -1,24 +1,55 @@
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 : MonoBehaviour {
public class IsoRigidbody : IsoPhysicsHelperHolder {
IsoFakeRigidbody _fakeRigidbody;
Rigidbody _realRigidbody = null;
protected Rigidbody realRigidbody {
Rigidbody realRigidbody {
get { return _realRigidbody; }
}
protected GameObject fakeObject {
get {
var helper = IsoUtils.GetOrCreateComponent<IsoPhysicHelper>(gameObject);
return helper ? helper.isoFakeObject : null;
[SerializeField]
public float _mass = 1.0f;
public float mass {
get { return _mass; }
set {
_mass = value;
if ( realRigidbody ) {
realRigidbody.mass = value;
}
}
}
[SerializeField]
public float _drag = 0.0f;
public float drag {
get { return _drag; }
set {
_drag = value;
if ( realRigidbody ) {
realRigidbody.drag = value;
}
}
}
[SerializeField]
public bool _useGravity = true;
public bool useGravity {
get { return _useGravity; }
set {
_useGravity = value;
if ( realRigidbody ) {
realRigidbody.useGravity = value;
}
}
}
@@ -67,15 +98,6 @@ namespace IsoTools {
}
}
public float drag {
get { return realRigidbody ? realRigidbody.drag : 0.0f; }
set {
if ( realRigidbody ) {
realRigidbody.drag = value;
}
}
}
public Vector3 inertiaTensor {
get { return realRigidbody ? realRigidbody.inertiaTensor : Vector3.zero; }
set {
@@ -85,15 +107,6 @@ namespace IsoTools {
}
}
public float mass {
get { return realRigidbody ? realRigidbody.mass : 0.0f; }
set {
if ( realRigidbody ) {
realRigidbody.mass = value;
}
}
}
public float maxDepenetrationVelocity {
get { return realRigidbody ? realRigidbody.maxDepenetrationVelocity : 0.0f; }
set {
@@ -112,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 useGravity {
get { return realRigidbody ? realRigidbody.useGravity : false; }
public int solverVelocityIterations {
get { return realRigidbody ? realRigidbody.solverVelocityIterations : 0; }
set {
if ( realRigidbody ) {
realRigidbody.useGravity = value;
realRigidbody.solverVelocityIterations = value;
}
}
}
public Vector3 velocity {
get { return realRigidbody ? realRigidbody.velocity : Vector3.zero; }
set {
@@ -143,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(
@@ -171,35 +168,29 @@ 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 AddRelativeForce(Vector3 force) {
AddRelativeForce(force, ForceMode.Force);
}
public void AddRelativeForce(Vector3 force, ForceMode mode) {
if ( realRigidbody ) {
realRigidbody.AddRelativeForce(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,
ForceMode mode = ForceMode.Force)
{
if ( realRigidbody ) {
realRigidbody.AddRelativeForce(force, mode);
}
}
public Vector3 ClosestPointOnBounds(Vector3 position) {
return realRigidbody
@@ -207,12 +198,42 @@ namespace IsoTools {
: Vector3.zero;
}
public Vector3 GetPointVelocity(Vector3 world_point) {
return realRigidbody
? realRigidbody.GetPointVelocity(world_point)
: Vector3.zero;
}
public Vector3 GetRelativePointVelocity(Vector3 relative_point) {
return realRigidbody
? realRigidbody.GetRelativePointVelocity(relative_point)
: Vector3.zero;
}
public bool IsSleeping() {
return realRigidbody
? realRigidbody.IsSleeping()
: false;
}
public void MovePosition(Vector3 position) {
if ( realRigidbody ) {
realRigidbody.MovePosition(position);
}
}
public void ResetCenterOfMass() {
if ( realRigidbody ) {
realRigidbody.ResetCenterOfMass();
}
}
public void ResetInertiaTensor() {
if ( realRigidbody ) {
realRigidbody.ResetInertiaTensor();
}
}
public void SetDensity(float density) {
if ( realRigidbody ) {
realRigidbody.SetDensity(density);
@@ -225,39 +246,41 @@ namespace IsoTools {
}
}
public void WakeUp() {
if ( realRigidbody ) {
realRigidbody.WakeUp();
}
}
public bool SweepTest(Vector3 direction, out IsoRaycastHit iso_hit_info) {
return SweepTest(direction, out iso_hit_info, Mathf.Infinity);
}
public bool SweepTest(Vector3 direction, out IsoRaycastHit iso_hit_info, float max_distance) {
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
? realRigidbody.SweepTest(direction, out hit_info, max_distance)
? realRigidbody.SweepTest(direction, out hit_info, max_distance, query_trigger_interaction)
: false;
iso_hit_info = result ? new IsoRaycastHit(hit_info) : new IsoRaycastHit();
return result;
}
public IsoRaycastHit[] SweepTestAll(Vector3 direction) {
return SweepTestAll(direction, Mathf.Infinity);
public IsoRaycastHit[] SweepTestAll(Vector3 direction,
float max_distance = Mathf.Infinity,
QueryTriggerInteraction query_trigger_interaction = QueryTriggerInteraction.UseGlobal)
{
return realRigidbody
? IsoPhysicsUtils.IsoConvertRaycastHits(
realRigidbody.SweepTestAll(direction, max_distance, query_trigger_interaction))
: new IsoRaycastHit[0];
}
public IsoRaycastHit[] SweepTestAll(Vector3 direction, float max_distance) {
return realRigidbody
? IsoUtils.IsoConvertRaycastHits(realRigidbody.SweepTestAll(direction, max_distance))
: new IsoRaycastHit[0];
public void WakeUp() {
if ( realRigidbody ) {
realRigidbody.WakeUp();
}
}
void Awake() {
IsoUtils.GetOrCreateComponent<IsoFakeRigidbody>(fakeObject).Init(this);
_realRigidbody = IsoUtils.GetOrCreateComponent<Rigidbody>(fakeObject);
_fakeRigidbody = fakeObject.AddComponent<IsoFakeRigidbody>().Init(this);
_realRigidbody = fakeObject.AddComponent<Rigidbody>();
_realRigidbody.freezeRotation = true;
_realRigidbody.mass = mass;
_realRigidbody.drag = drag;
_realRigidbody.useGravity = useGravity;
_realRigidbody.isKinematic = isKinematic;
_realRigidbody.interpolation = interpolation;
_realRigidbody.collisionDetectionMode = collisionDetectionMode;
@@ -277,14 +300,19 @@ namespace IsoTools {
void OnDestroy() {
if ( _realRigidbody ) {
Destroy(fakeObject.GetComponent<IsoFakeRigidbody>());
Destroy(_realRigidbody);
_realRigidbody = null;
}
if ( _fakeRigidbody ) {
Destroy(_fakeRigidbody);
}
DestroyUnnecessaryCheck();
}
#if UNITY_EDITOR
#if UNITY_EDITOR
void Reset() {
mass = 1.0f;
drag = 0.0f;
useGravity = true;
isKinematic = false;
interpolation = RigidbodyInterpolation.None;
collisionDetectionMode = CollisionDetectionMode.Discrete;
@@ -293,11 +321,14 @@ namespace IsoTools {
void OnValidate() {
if ( realRigidbody ) {
realRigidbody.mass = mass;
realRigidbody.drag = drag;
realRigidbody.useGravity = useGravity;
realRigidbody.isKinematic = isKinematic;
realRigidbody.interpolation = interpolation;
realRigidbody.collisionDetectionMode = collisionDetectionMode;
}
}
#endif
#endif
}
} // namespace IsoTools
}

View File

@@ -5,7 +5,7 @@ using IsoTools.Internal;
using UnityEditor;
#endif
namespace IsoTools {
namespace IsoTools.Physics {
[RequireComponent(typeof(IsoObject))]
public class IsoSphereCollider : IsoCollider {
@@ -44,12 +44,13 @@ namespace IsoTools {
get { return realCollider as SphereCollider; }
}
#if UNITY_EDITOR
#if UNITY_EDITOR
protected override void Reset() {
base.Reset();
var iso_object = GetComponent<IsoObject>();
radius = iso_object ? IsoUtils.Vec3MinF(iso_object.size) * 0.5f : 0.0f;
offset = iso_object ? iso_object.size * 0.5f : Vector3.zero;
var iso_object = GetComponent<IsoObject>();
var iso_object_size = iso_object ? iso_object.size : Vector3.zero;
radius = IsoUtils.Vec3MinF(iso_object_size) * 0.5f;
offset = iso_object_size * 0.5f;
EditorUtility.SetDirty(this);
}
@@ -64,13 +65,13 @@ 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,
Color.green);
}
}
#endif
#endif
}
} // namespace IsoTools
}

View File

@@ -0,0 +1,22 @@
using UnityEngine;
using IsoTools.Physics.Internal;
namespace IsoTools.Physics {
[DisallowMultipleComponent]
[RequireComponent(typeof(IsoObject))]
public class IsoTriggerListener : IsoPhysicsHelperHolder {
IsoFakeTriggerListener _fakeListener;
void Awake() {
_fakeListener = fakeObject.AddComponent<IsoFakeTriggerListener>().Init(this);
}
void OnDestroy() {
if ( _fakeListener ) {
Destroy(_fakeListener);
}
DestroyUnnecessaryCheck();
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 1925507eee33e42c2a04a1ae1eaa1ec5
timeCreated: 1461096892
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: c8b3ac68bbc98425a9242e12a4d2951c
guid: a3264192dd6f94e708ddbcd72bf32a61
folderAsset: yes
timeCreated: 1449997605
timeCreated: 1477130201
licenseType: Free
DefaultImporter:
userData:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8a23c47afc2e94d18abf9f1cb58fb612
folderAsset: yes
timeCreated: 1449997824
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8925808e9509b47b187c8890c644ba0c
timeCreated: 1450615607
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View 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:

View 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(
"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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 2b59e8593133b453bb434f86de86993a
timeCreated: 1450193215
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 693a3d4871bd64c19a94cce4a562f96a
timeCreated: 1450193231
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View 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:

View 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

View 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:

View File

@@ -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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 2dffeb7d382404baa9daf01f1da629a1
timeCreated: 1450288005
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 52e132a4a0d844bbd84f8b1fbd61aa12
timeCreated: 1450288016
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c611ab0e954f04d81bb71728da293513
timeCreated: 1450001517
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ee5d31a178d81452ea41e5945bdec367
timeCreated: 1450021857
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View 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:

View 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

View 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:

View 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 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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: a4c5cff4e06894f2aae07daa307c76d9
timeCreated: 1450207773
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 88c45e14a4cd040f992be5868786242f
timeCreated: 1450196704
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 91eb63755433a4241b6cdf806e27a493
timeCreated: 1450196722
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ea8962e92212e431ba4e354fbb0ff3e3
timeCreated: 1450619756
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 571909e63f3954244b08fd7338e68605
timeCreated: 1450110259
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 98f632c63797046b1a8f1898d00bc756
timeCreated: 1450621255
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 57163cba226bd4f199a950f56d1f2a5c
timeCreated: 1450621269
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: bc13998ebfe99487a9e042a27adb3d18
timeCreated: 1450621205
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View 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:

View 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

View 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:

View File

@@ -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

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: fd8b09a582b9846e79c50485090f3fe3
timeCreated: 1450622310
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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

View 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:

View 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

View File

@@ -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