This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.UI; | |
| public class Blink : MonoBehaviour { | |
| //public | |
| public float speed = 1.0f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.UI; | |
| using System.Collections; | |
| public class Viewer : MonoBehaviour { | |
| public float maxAngle = 60.0F; //垂直方向に回転できる上限角度 | |
| public float minAngle = 300.0F; //垂直方向に回転できる下限角度 | |
| public float rotateSpeed = 30.0f; //回転速度(角度/秒) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.UI; | |
| using System.Collections; | |
| public class Pinch : MonoBehaviour { | |
| public float pinchSpeed = 0.05f; //ピンチ時移動速度 | |
| private GameObject camera; //メインカメラ | |
| private Vector2[] beforePoint; //1フレーム前のポイント(各指) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.UI; | |
| using System.Collections; | |
| public class ParallelMove : MonoBehaviour { | |
| public float moveSpeed = 0.05f; //スワイプ時移動速度 | |
| private GameObject camera; //メインカメラ | |
| private Vector2[] beforePoint; //1フレーム前のポイント(各指) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.UI; | |
| using System.Collections; | |
| public class Rotate : MonoBehaviour { | |
| public float maxAngle = 60.0F; //垂直方向に回転できる上限角度 | |
| public float minAngle = 300.0F; //垂直方向に回転できる下限角度 | |
| public float rotateSpeed = 30.0f; //回転速度(角度/秒) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using UnityStandardAssets.ImageEffects; | |
| public class TapFocus : MonoBehaviour { | |
| void Update () { | |
| if (Input.GetMouseButton(0)) { | |
| //レイを生成 | |
| Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.UI; | |
| using System.Collections; | |
| public class TapAction : MonoBehaviour { | |
| public float flickTime = 0.15f; //フリック判定用 時間しきい値 | |
| public float flickMagnitude = 100; //フリック判定用 移動距離 | |
| private Vector2 startPosition; //タップ開始ポイント |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class masterData { | |
| public int id; | |
| public string name; | |
| public int hp; | |
| public int sp; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class loadMasterData : MonoBehaviour { | |
| //データ格納用List | |
| public List<masterData> list = new List<masterData>(); | |
| void Awake() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class readText : MonoBehaviour { | |
| void Start () { | |
| //resourcesフォルダ内にあるsampleTextファイルをロード | |
| TextAsset textAsset = Resources.Load("sampleText") as TextAsset; | |
| //ロードした中身をstring型に変換 | |
| string text = textAsset.text; |
NewerOlder