This commit is contained in:
2024-10-16 00:03:41 +08:00
commit 897058435c
5033 changed files with 1009728 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 897a68b4076b4f441b4ae694f52a349a
timeCreated: 1454489013
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 26609f2a26dfb8e458b420fc9afb84bf
timeCreated: 1454505899
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6f0d1c2c27c3f3c4c8229cb50269d831
folderAsset: yes
timeCreated: 1454494926
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,47 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class RTS_NewSyntaxe : MonoBehaviour {
private GameObject cube;
void Start () {
cube= null;
}
void Update () {
Gesture current = EasyTouch.current;
// Cube
if (current.type == EasyTouch.EvtType.On_SimpleTap && current.pickedObject !=null && current.pickedObject.name=="Cube"){
ResteColor();
cube = current.pickedObject;
cube.GetComponent<Renderer>().material.color = Color.red;
//transform.Translate(Vector2.up, Space.World);
}
// Swipe
if (current.type == EasyTouch.EvtType.On_Swipe && current.touchCount == 1){
transform.Translate( Vector3.left * current.deltaPosition.x / Screen.width);
transform.Translate( Vector3.back * current.deltaPosition.y / Screen.height);
}
// Pinch
if (current.type == EasyTouch.EvtType.On_Pinch ){
Camera.main.fieldOfView += current.deltaPinch * 10 * Time.deltaTime;
}
// Twist
if (current.type == EasyTouch.EvtType.On_Twist ){
transform.Rotate( Vector3.up * current.twistAngle);
}
}
void ResteColor(){
if (cube!=null){
cube.GetComponent<Renderer>().material.color = new Color(60f/255f,143f/255f,201f/255f);
}
}
}

View File

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

View File

@@ -0,0 +1,43 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class SimpleActionExample : MonoBehaviour {
private TextMesh textMesh;
private Vector3 startScale;
void Start () {
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
startScale = transform.localScale;
}
// Change the color
public void ChangeColor(Gesture gesture){
RandomColor();
}
// display action action
public void TimePressed(Gesture gesture){
textMesh.text = "Down since :" + gesture.actionTime.ToString("f2");
}
// Display swipe angle
public void DisplaySwipeAngle(Gesture gesture){
float angle = gesture.GetSwipeOrDragAngle();
textMesh.text = angle.ToString("f2") + " / " + gesture.swipe.ToString();
}
// Change text
public void ChangeText(string text){
textMesh.text = text;
}
public void ResetScale(){
transform.localScale = startScale;
}
private void RandomColor(){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}

View File

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