Internal folder for utils

This commit is contained in:
2015-12-20 18:01:43 +06:00
parent 5f2156de14
commit 6574c1c810
23 changed files with 46 additions and 20 deletions

View File

@@ -72,19 +72,19 @@
<Compile Include="Assets\IsoTools\PlayMaker\Events\IsoTriggerEvent.cs" /> <Compile Include="Assets\IsoTools\PlayMaker\Events\IsoTriggerEvent.cs" />
<Compile Include="Assets\IsoTools\PlayMaker\Internal\IsoComponentAction.cs" /> <Compile Include="Assets\IsoTools\PlayMaker\Internal\IsoComponentAction.cs" />
<Compile Include="Assets\IsoTools\PlayMaker\Internal\IsoFSMEvents.cs" /> <Compile Include="Assets\IsoTools\PlayMaker\Internal\IsoFSMEvents.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\IsoBoxCollider.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoCollider.cs" /> <Compile Include="Assets\IsoTools\Scripts\IsoCollider.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoCollision.cs" /> <Compile Include="Assets\IsoTools\Scripts\IsoCollision.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoContactPoint.cs" /> <Compile Include="Assets\IsoTools\Scripts\IsoContactPoint.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoFakeCollider.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoFakeObject.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoFakeRigidbody.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoObject.cs" /> <Compile Include="Assets\IsoTools\Scripts\IsoObject.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoPhysicHelper.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoRaycastHit.cs" /> <Compile Include="Assets\IsoTools\Scripts\IsoRaycastHit.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoRigidbody.cs" /> <Compile Include="Assets\IsoTools\Scripts\IsoRigidbody.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoSphereCollider.cs" /> <Compile Include="Assets\IsoTools\Scripts\IsoSphereCollider.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoUtils.cs" />
<Compile Include="Assets\IsoTools\Scripts\IsoWorld.cs" /> <Compile Include="Assets\IsoTools\Scripts\IsoWorld.cs" />
<Compile Include="Assets\PlayMaker\Actions\ActivateGameObject.cs" /> <Compile Include="Assets\PlayMaker\Actions\ActivateGameObject.cs" />
<Compile Include="Assets\PlayMaker\Actions\AddAnimationClip.cs" /> <Compile Include="Assets\PlayMaker\Actions\AddAnimationClip.cs" />

View File

@@ -3,7 +3,7 @@ using UnityEditor;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
namespace IsoTools { namespace IsoTools.Internal {
[CustomEditor(typeof(IsoObject)), CanEditMultipleObjects] [CustomEditor(typeof(IsoObject)), CanEditMultipleObjects]
class IsoObjectEditor : Editor { class IsoObjectEditor : Editor {

View File

@@ -26,16 +26,24 @@ namespace IsoTools.Examples {
void Update () { void Update () {
if ( Input.GetKey(KeyCode.LeftArrow) ) { if ( Input.GetKey(KeyCode.LeftArrow) ) {
_isoRigidbody.velocity = IsoUtils.Vec3ChangeX(_isoRigidbody.velocity, -speed); var velocity = _isoRigidbody.velocity;
velocity.x = -speed;
_isoRigidbody.velocity = velocity;
} }
else if ( Input.GetKey(KeyCode.RightArrow) ) { else if ( Input.GetKey(KeyCode.RightArrow) ) {
_isoRigidbody.velocity = IsoUtils.Vec3ChangeX(_isoRigidbody.velocity, speed); var velocity = _isoRigidbody.velocity;
velocity.x = speed;
_isoRigidbody.velocity = velocity;
} }
else if ( Input.GetKey(KeyCode.DownArrow) ) { else if ( Input.GetKey(KeyCode.DownArrow) ) {
_isoRigidbody.velocity = IsoUtils.Vec3ChangeY(_isoRigidbody.velocity, -speed); var velocity = _isoRigidbody.velocity;
velocity.y = -speed;
_isoRigidbody.velocity = velocity;
} }
else if ( Input.GetKey(KeyCode.UpArrow) ) { else if ( Input.GetKey(KeyCode.UpArrow) ) {
_isoRigidbody.velocity = IsoUtils.Vec3ChangeY(_isoRigidbody.velocity, speed); var velocity = _isoRigidbody.velocity;
velocity.y = speed;
_isoRigidbody.velocity = velocity;
} }
} }
} }

View File

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

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace IsoTools { namespace IsoTools.Internal {
public class IsoFakeCollider : MonoBehaviour { public class IsoFakeCollider : MonoBehaviour {
IsoCollider _isoCollider = null; IsoCollider _isoCollider = null;
@@ -13,4 +13,4 @@ namespace IsoTools {
get { return _isoCollider; } get { return _isoCollider; }
} }
} }
} // namespace IsoTools } // namespace IsoTools.Internal

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace IsoTools { namespace IsoTools.Internal {
public class IsoFakeObject : MonoBehaviour { public class IsoFakeObject : MonoBehaviour {
IsoObject _isoObject = null; IsoObject _isoObject = null;
@@ -52,4 +52,4 @@ namespace IsoTools {
SendMessageOptions.DontRequireReceiver); SendMessageOptions.DontRequireReceiver);
} }
} }
} // namespace IsoTools } // namespace IsoTools.Internal

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace IsoTools { namespace IsoTools.Internal {
public class IsoFakeRigidbody : MonoBehaviour { public class IsoFakeRigidbody : MonoBehaviour {
IsoRigidbody _isoRigidbody = null; IsoRigidbody _isoRigidbody = null;
@@ -13,4 +13,4 @@ namespace IsoTools {
get { return _isoRigidbody; } get { return _isoRigidbody; }
} }
} }
} // namespace IsoTools } // namespace IsoTools.Internal

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace IsoTools { namespace IsoTools.Internal {
[DisallowMultipleComponent] [DisallowMultipleComponent]
[RequireComponent(typeof(IsoObject))] [RequireComponent(typeof(IsoObject))]
public class IsoPhysicHelper : MonoBehaviour { public class IsoPhysicHelper : MonoBehaviour {
@@ -27,4 +27,4 @@ namespace IsoTools {
} }
} }
} }
} // namespace IsoTools } // namespace IsoTools.Internal

View File

@@ -4,7 +4,7 @@
using UnityEditor; using UnityEditor;
#endif #endif
namespace IsoTools { namespace IsoTools.Internal {
public static class IsoUtils { public static class IsoUtils {
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
@@ -534,4 +534,4 @@ namespace IsoTools {
} }
#endif #endif
} }
} } // namespace IsoTools.Internal

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
#if UNITY_EDITOR #if UNITY_EDITOR
using UnityEditor; using UnityEditor;

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
#if UNITY_EDITOR #if UNITY_EDITOR
using UnityEditor; using UnityEditor;

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
namespace IsoTools { namespace IsoTools {
public class IsoCollision { public class IsoCollision {

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
namespace IsoTools { namespace IsoTools {
public struct IsoContactPoint { public struct IsoContactPoint {

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
using System.Collections.Generic; using System.Collections.Generic;
#if UNITY_EDITOR #if UNITY_EDITOR

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
namespace IsoTools { namespace IsoTools {
public struct IsoRaycastHit { public struct IsoRaycastHit {

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
#if UNITY_EDITOR #if UNITY_EDITOR
using UnityEditor; using UnityEditor;

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
#if UNITY_EDITOR #if UNITY_EDITOR
using UnityEditor; using UnityEditor;

View File

@@ -1,4 +1,5 @@
using UnityEngine; using UnityEngine;
using IsoTools.Internal;
using System.Collections.Generic; using System.Collections.Generic;
#if UNITY_EDITOR #if UNITY_EDITOR