Commit da3c29f5 authored by wanqing's avatar wanqing

货拉拉新玩法体验

parent 2bd2bd95
......@@ -63,6 +63,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\#C3_Materials\Toony Colors\Editor\TCF_MaterialInspector.cs" />
<Compile Include="Assets\#E1_Plugins\RayFire\Scripts\Editor\RFMeshAsset.cs" />
<Compile Include="Assets\#E1_Plugins\RayFire\Scripts\Editor\RFOrder.cs" />
<Compile Include="Assets\#E1_Plugins\RayFire\Scripts\Editor\RayfireActivatorEditor.cs" />
......@@ -85,6 +86,28 @@
<Compile Include="Assets\#E1_Plugins\RayFire\Scripts\Editor\RayfireWindEditor.cs" />
<Compile Include="Assets\Demigiant\DOTweenPro\Editor\DOTweenAnimationInspector.cs" />
<Compile Include="Assets\Demigiant\DOTweenPro\Editor\DOTweenPreviewManager.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\EasyTouchInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\EasyTouchMenu.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\EasyTouchTriggerInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\EasyTouchWelcomeScreen.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\EasytouchHierachyCallBack.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\HTGuiTools.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\QuickDragInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\QuickEnterExitInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\QuickLongTapInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\QuickPinchInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\QuickSwipeInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\QuickTapInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\QuickTouchInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouch\Plugins\Editor\QuickTwistInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouchControls\Plugins\Editor\ETCAreaInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouchControls\Plugins\Editor\ETCAxisInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouchControls\Plugins\Editor\ETCButtonInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouchControls\Plugins\Editor\ETCDPadInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouchControls\Plugins\Editor\ETCGuiTools.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouchControls\Plugins\Editor\ETCJoystickInspector.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouchControls\Plugins\Editor\ETCMenu.cs" />
<Compile Include="Assets\EasyTouchBundle\EasyTouchControls\Plugins\Editor\ETCTouchPadInspector.cs" />
<Compile Include="Assets\Ultimate Game Tools\AutomaticLOD\Editor\AutomaticLODEditor.cs" />
<Compile Include="Assets\Ultimate Game Tools\MeshSimplify\Editor\MeshSimplifyEditor.cs" />
<None Include="Assets\Demigiant\DemiLib\Core\Editor\DemiEditor.xml" />
......@@ -289,6 +312,15 @@
<Reference Include="SyntaxTree.VisualStudio.Unity.Bridge">
<HintPath>C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/16.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll</HintPath>
</Reference>
<Reference Include="EasyRoads3Dv3Editor">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/#E1_Plugins/EasyRoads3D/Editor/EasyRoads3Dv3Editor.dll</HintPath>
</Reference>
<Reference Include="DelaunayER">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/#E1_Plugins/EasyRoads3D/lib/DelaunayER.dll</HintPath>
</Reference>
<Reference Include="EasyRoads3Dv3">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/#E1_Plugins/EasyRoads3D/lib/EasyRoads3Dv3.dll</HintPath>
</Reference>
<Reference Include="RFLib_DotNet_2018">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/#E1_Plugins/RayFire/Plugins/Windows/x86_x64/RFLib_DotNet_2018.dll</HintPath>
</Reference>
......@@ -705,10 +737,30 @@
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="Assembly-CSharp-firstpass.csproj">
<Project>{72DAC43B-098B-5EAA-A2C6-CD4E0B6C4EBD}</Project>
<Name>Assembly-CSharp-firstpass</Name>
</ProjectReference>
<ProjectReference Include="Assembly-CSharp.csproj">
<Project>{CD77B65F-9B50-E97E-0390-620E4E44A88A}</Project>
<Name>Assembly-CSharp</Name>
</ProjectReference>
<ProjectReference Include="NonConvexCollider.csproj">
<Project>{4A53D976-90CE-B67A-0DEA-DE22BE9BB718}</Project>
<Name>NonConvexCollider</Name>
</ProjectReference>
<ProjectReference Include="RuntimeTestAssembly.csproj">
<Project>{BB111E4F-FD40-2155-A70C-F4F07B555240}</Project>
<Name>RuntimeTestAssembly</Name>
</ProjectReference>
<ProjectReference Include="NonConvexEditor.csproj">
<Project>{83A04F47-5AD9-DA58-BDC3-6763703351B5}</Project>
<Name>NonConvexEditor</Name>
</ProjectReference>
<ProjectReference Include="NonConvexColliderRuntimeAPI.csproj">
<Project>{E315DBB2-A94A-3112-848E-A379584BC942}</Project>
<Name>NonConvexColliderRuntimeAPI</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="GenerateTargetFrameworkMonikerAttribute" />
......
......@@ -63,14 +63,23 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Plugins\Demigiant\DOTween\Modules\DOTweenModuleAudio.cs" />
<Compile Include="Assets\Plugins\Demigiant\DOTween\Modules\DOTweenModulePhysics.cs" />
<Compile Include="Assets\Plugins\Demigiant\DOTween\Modules\DOTweenModulePhysics2D.cs" />
<Compile Include="Assets\Plugins\Demigiant\DOTween\Modules\DOTweenModuleSprite.cs" />
<Compile Include="Assets\Plugins\Demigiant\DOTween\Modules\DOTweenModuleUI.cs" />
<Compile Include="Assets\Plugins\Demigiant\DOTween\Modules\DOTweenModuleUnityVersion.cs" />
<Compile Include="Assets\Plugins\Demigiant\DOTween\Modules\DOTweenModuleUtils.cs" />
<None Include="Assets\Plugins\Demigiant\DOTween\readme.txt" />
<Compile Include="Assets\Plugins\EasyTouch\Components\EasyTouchTrigger.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickBase.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickDrag.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickEnterOverExist.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickLongTap.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickPinch.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickSwipe.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickTap.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickTouch.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Components\QuickTwist.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Engine\BaseFinger.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Engine\ECamera.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Engine\EasyTouch.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Engine\EasyTouchInput.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Engine\Finger.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Engine\Gesture.cs" />
<Compile Include="Assets\Plugins\EasyTouch\Engine\TwoFingerGesture.cs" />
<Reference Include="UnityEngine">
<HintPath>D:/wan/unity2019.3.14path/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.dll</HintPath>
</Reference>
......@@ -248,11 +257,23 @@
<Reference Include="UnityEditor">
<HintPath>D:/wan/unity2019.3.14path/Unity/Editor/Data/Managed/UnityEditor.dll</HintPath>
</Reference>
<Reference Include="DelaunayER">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/#E1_Plugins/EasyRoads3D/lib/DelaunayER.dll</HintPath>
</Reference>
<Reference Include="EasyRoads3Dv3">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/#E1_Plugins/EasyRoads3D/lib/EasyRoads3Dv3.dll</HintPath>
</Reference>
<Reference Include="RFLib_DotNet_2018">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/#E1_Plugins/RayFire/Plugins/Windows/x86_x64/RFLib_DotNet_2018.dll</HintPath>
</Reference>
<Reference Include="DemiLib">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/Demigiant/DemiLib/Core/DemiLib.dll</HintPath>
</Reference>
<Reference Include="DOTween">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/Plugins/Demigiant/DOTween/DOTween.dll</HintPath>
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/Demigiant/DOTween/DOTween.dll</HintPath>
</Reference>
<Reference Include="DOTweenPro">
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Assets/Demigiant/DOTweenPro/DOTweenPro.dll</HintPath>
</Reference>
<Reference Include="mscorlib">
<HintPath>D:/wan/unity2019.3.14path/Unity/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll</HintPath>
......@@ -636,7 +657,24 @@
<HintPath>D:/wan/dyspaceGame/TruckJourney/TruckJourney/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup></ItemGroup>
<ItemGroup>
<ProjectReference Include="NonConvexCollider.csproj">
<Project>{4A53D976-90CE-B67A-0DEA-DE22BE9BB718}</Project>
<Name>NonConvexCollider</Name>
</ProjectReference>
<ProjectReference Include="RuntimeTestAssembly.csproj">
<Project>{BB111E4F-FD40-2155-A70C-F4F07B555240}</Project>
<Name>RuntimeTestAssembly</Name>
</ProjectReference>
<ProjectReference Include="NonConvexEditor.csproj">
<Project>{83A04F47-5AD9-DA58-BDC3-6763703351B5}</Project>
<Name>NonConvexEditor</Name>
</ProjectReference>
<ProjectReference Include="NonConvexColliderRuntimeAPI.csproj">
<Project>{E315DBB2-A94A-3112-848E-A379584BC942}</Project>
<Name>NonConvexColliderRuntimeAPI</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="GenerateTargetFrameworkMonikerAttribute" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
......
This diff is collapsed.
......@@ -25,11 +25,11 @@ public class FollowTarget : MonoBehaviour
m_rigidbody.velocity.Normalize();
// Save transform localy
Quaternion curRot = transform.rotation;
//Quaternion curRot = transform.rotation;
Vector3 tPos = player.position + player.TransformDirection(offset);
// Look at the target
transform.LookAt(player);
//transform.LookAt(player);
// Keep the camera above the target y position
if (tPos.y < player.position.y)
......@@ -37,8 +37,8 @@ public class FollowTarget : MonoBehaviour
tPos.y = player.position.y;
}
// Set transform with lerp
transform.position = Vector3.Lerp(transform.position, tPos, Time.fixedDeltaTime * 4);
transform.rotation = Quaternion.Lerp(curRot, transform.rotation, Time.fixedDeltaTime * 6);
transform.position = Vector3.Lerp(transform.position, tPos, 0.8f);
//transform.rotation = Quaternion.Lerp(curRot, transform.rotation, Time.fixedDeltaTime * 6);
// Keep camera above the y:0.5f to prevent camera going underground
if (transform.position.y < 0.5f)
......
......@@ -5,7 +5,7 @@ using UnityEngine;
public class InputServices : BaseServices
{
public BattleJoinPad pad;
//public ETCJoystick joyStick;
public ETCJoystick joyStick;
public override void OnUpdate()
{
......
fileFormatVersion: 2
guid: 317d19313d1d7204e9bbc37122116e7f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 38fefffd7e623dc42bae5ec5ee03ed6f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ca40beb7fc6998f40a6e15a59c6ab599
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 325c11e064841204bbd6de7c85bebef6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: aa43ce62596b0784081ec9bd0abc8516
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 72c6771ac3d4a7549955e6544db22b49
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 974bea9458f9b8b429ee962210d908c3
folderAsset: yes
timeCreated: 1435661089
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 93b02354e4d30d344b1c7d05508062ef
folderAsset: yes
timeCreated: 1435661089
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8636b46a30994e6418c03f066dd398eb
folderAsset: yes
timeCreated: 1454534249
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e942dffb140fa5c41bdea0387f2b1611
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a68960aaa0f5dca449809cb0b1b27c11
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9cb9b4964fc653b4280fd1964220fe98
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MultiLayerTouch : MonoBehaviour {
public Text label;
public Text label2;
void OnEnable(){
EasyTouch.On_TouchDown += On_TouchDown;
EasyTouch.On_TouchUp += On_TouchUp;
}
void OnDestroy(){
EasyTouch.On_TouchDown -= On_TouchDown;
EasyTouch.On_TouchUp -= On_TouchUp;
}
void On_TouchDown (Gesture gesture)
{
if (gesture.pickedObject!=null){
if (!EasyTouch.GetAutoUpdatePickedObject()){
label.text = "Picked object from event : " + gesture.pickedObject.name + " : " + gesture.position;
}
else{
label.text = "Picked object from event : " + gesture.pickedObject.name + " : " + gesture.position;
}
}
else{
if (!EasyTouch.GetAutoUpdatePickedObject()){
label.text = "Picked object from event : none";
}
else{
label.text = "Picked object from event : none";
}
}
label2.text = "";
if (!EasyTouch.GetAutoUpdatePickedObject()){
GameObject tmp = gesture.GetCurrentPickedObject();
if (tmp != null){
label2.text = "Picked object from GetCurrentPickedObject : " + tmp.name ;
}
else{
label2.text = "Picked object from GetCurrentPickedObject : none";
}
}
}
void On_TouchUp (Gesture gesture)
{
label.text="";
label2.text="";
}
}
fileFormatVersion: 2
guid: e216320e99cdf2a46b09dfd99909dd12
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MultiLayerUI : MonoBehaviour {
public void SetAutoSelect(bool value){
EasyTouch.SetEnableAutoSelect( value );
}
public void SetAutoUpdate( bool value){
EasyTouch.SetAutoUpdatePickedObject( value);
}
public void Layer1( bool value){
LayerMask mask = EasyTouch.Get3DPickableLayer();
if (value)
mask = mask | (1<<8);
else{
mask = ~mask;
mask = ~(mask | (1<<8));
}
EasyTouch.Set3DPickableLayer( mask);
}
public void Layer2( bool value){
LayerMask mask = EasyTouch.Get3DPickableLayer();
if (value)
mask = mask | (1<<9);
else{
mask = ~mask;
mask = ~(mask | (1<<9));
}
EasyTouch.Set3DPickableLayer( mask);
}
public void Layer3( bool value){
LayerMask mask = EasyTouch.Get3DPickableLayer();
if (value)
mask = mask | (1<<10);
else{
mask = ~mask;
mask = ~(mask | (1<<10));
}
EasyTouch.Set3DPickableLayer( mask);
}
}
fileFormatVersion: 2
guid: 6f90638b553ac94438157f6b4c58cbad
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 84a338d71379a134f9db0c3cac9ea126
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 578fdf5bb9585174b9b0a88a41758e52
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MultiCameraTouch : MonoBehaviour {
public Text label;
void OnEnable(){
EasyTouch.On_TouchDown += On_TouchDown;
EasyTouch.On_TouchUp += On_TouchUp;
}
void OnDestroy(){
EasyTouch.On_TouchDown -= On_TouchDown;
EasyTouch.On_TouchUp -= On_TouchUp;
}
void On_TouchDown (Gesture gesture)
{
if (gesture.pickedObject != null){
label.text = "You touch : " + gesture.pickedObject.name + " on camera : " + gesture.pickedCamera.name;
}
}
void On_TouchUp (Gesture gesture)
{
label.text = "";
}
}
fileFormatVersion: 2
guid: 4632564b2dbf5804a9d37598f0b5b601
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MultiCameraUI : MonoBehaviour {
public Camera cam2;
public Camera cam3;
public void AddCamera2(bool value){
AddCamera( cam2,value);
}
public void AddCamera3(bool value){
AddCamera( cam3,value);
}
public void AddCamera(Camera cam,bool value){
if (value){
EasyTouch.AddCamera( cam,false);
}
else{
EasyTouch.RemoveCamera( cam);
}
}
}
fileFormatVersion: 2
guid: e50b1bdf57f5ec14abc2c012c9b3b572
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: c2c62ee1634f7de4490a71af5e85b7e5
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5ac22eac33e47d5449d5b86b4d91c34f
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: cc4e6501cec44964ea149ac7656bcf9b
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class CubeSelect : MonoBehaviour {
private GameObject cube;
void OnEnable(){
EasyTouch.On_SimpleTap += On_SimpleTap;
}
void OnDestroy(){
EasyTouch.On_SimpleTap -= On_SimpleTap;
}
void Start(){
cube= null;
}
void On_SimpleTap (Gesture gesture){
if (gesture.pickedObject !=null && gesture.pickedObject.name=="Cube"){
ResteColor();
cube = gesture.pickedObject;
cube.GetComponent<Renderer>().material.color = Color.red;
}
}
void ResteColor(){
if (cube!=null){
cube.GetComponent<Renderer>().material.color = new Color(60f/255f,143f/255f,201f/255f);
}
}
}
fileFormatVersion: 2
guid: 68d853e7dd8695b4a8079972e40963e6
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class RTSCamera : MonoBehaviour {
private Vector3 delta;
void OnEnable(){
EasyTouch.On_Swipe += On_Swipe;
EasyTouch.On_Drag += On_Drag;
EasyTouch.On_Twist += On_Twist;
EasyTouch.On_Pinch += On_Pinch;
}
void On_Twist (Gesture gesture){
transform.Rotate( Vector3.up * gesture.twistAngle);
}
void OnDestroy(){
EasyTouch.On_Swipe -= On_Swipe;
EasyTouch.On_Drag -= On_Drag;
EasyTouch.On_Twist -= On_Twist;
}
void On_Drag (Gesture gesture){
On_Swipe( gesture);
}
void On_Swipe (Gesture gesture){
transform.Translate( Vector3.left * gesture.deltaPosition.x / Screen.width);
transform.Translate( Vector3.back * gesture.deltaPosition.y / Screen.height);
}
void On_Pinch (Gesture gesture){
Camera.main.fieldOfView += gesture.deltaPinch * Time.deltaTime;
}
}
fileFormatVersion: 2
guid: 4ada74f31ee49e34681124dbda740a5c
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1cf9c78521d12f14d8690a557c4c1103
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 95511c078470de147aa305315a4be8ee
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
public class Ball : MonoBehaviour {
// Update is called once per frame
}
fileFormatVersion: 2
guid: 0ab70292744e9c9448bf89c713e8d90a
timeCreated: 1456741077
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 200
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class BallRunPlayer : MonoBehaviour {
public Transform ballModel;
private bool start =false;
private Vector3 moveDirection;
private CharacterController characterController;
private Vector3 startPosition;
private bool isJump = false;
void OnEnable(){
EasyTouch.On_SwipeEnd += On_SwipeEnd;
}
void OnDestroy(){
EasyTouch.On_SwipeEnd -= On_SwipeEnd;
}
void Start(){
characterController = GetComponent<CharacterController>();
startPosition = transform.position;
}
void Update () {
if (start){
moveDirection = transform.TransformDirection(Vector3.forward)* 10f * Time.deltaTime;
moveDirection.y -= 9.81f * Time.deltaTime;
if (isJump){
moveDirection.y = 8f;
isJump = false;
}
characterController.Move( moveDirection);
ballModel.Rotate( Vector3.right * 400 * Time.deltaTime);
}
if (transform.position.y<0.5){
start=false;
transform.position = startPosition;
}
}
void OnCollision(){
Debug.Log("ok");
}
void On_SwipeEnd (Gesture gesture){
if (start){
switch (gesture.swipe){
case EasyTouch.SwipeDirection.DownLeft:
case EasyTouch.SwipeDirection.UpLeft:
case EasyTouch.SwipeDirection.Left:
transform.Rotate(Vector3.up * -90);
break;
case EasyTouch.SwipeDirection.DownRight:
case EasyTouch.SwipeDirection.UpRight:
case EasyTouch.SwipeDirection.Right:
transform.Rotate(Vector3.up * 90);
break;
case EasyTouch.SwipeDirection.Up:
if (characterController.isGrounded){
isJump = true;
}
break;
}
}
}
public void StartGame(){
start = true;
}
}
fileFormatVersion: 2
guid: f2c2690da05f1ee41b37fea93ee7fd77
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class ThirdPersonCamera : MonoBehaviour
{
public float distanceAway; // distance from the back of the craft
public float distanceUp; // distance above the craft
public float smooth; // how smooth the camera movement is
private GameObject hovercraft; // to store the hovercraft
private Vector3 targetPosition; // the position the camera is trying to be in
Transform follow;
void Start(){
follow = GameObject.FindWithTag ("Player").transform;
}
void LateUpdate ()
{
// setting the target position to be the correct offset from the hovercraft
targetPosition = follow.position + Vector3.up * distanceUp - follow.forward * distanceAway;
// making a smooth transition between it's current position and the position it wants to be in
transform.position = Vector3.Lerp(transform.position, targetPosition, Time.deltaTime * smooth);
// make sure the camera is looking the right way!
transform.LookAt(follow);
}
}
fileFormatVersion: 2
guid: d84d76fc294bc384d9ea022f75bf9fe1
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment