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; | |
/// <summary> | |
/// 計算に関するUtilityクラス | |
/// </summary> | |
public class MathUtils | |
{ | |
/// <summary> | |
/// 点と円の内外判定を行う | |
/// </summary> |
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 GvrHandController : IHandController | |
{ | |
Transform controller = null; | |
public Vector3 Position { get { return (controller ?? (controller = GameObject.FindObjectOfType<GvrTrackedController>().transform)).position; } } | |
public Quaternion Orientation { get { return GvrControllerInput.Orientation; } } | |
public Vector3 Gyro { get { return GvrControllerInput.Gyro; } } | |
public Vector3 Accel { get { return GvrControllerInput.Accel; } } | |
public bool IsTouching { get { return GvrControllerInput.IsTouching; } } | |
public bool TouchDown { get { return GvrControllerInput.TouchDown; } } | |
public bool TouchUp { get { return GvrControllerInput.TouchUp; } } |
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 CameraController : MonoBehaviour | |
{ | |
Vector3 basePos = Vector3.zero; | |
void Start() | |
{ | |
basePos = transform.position; |
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 static class MathUtility | |
{ | |
public static int Mod(float a, float b) | |
{ | |
return (int)(a - Mathf.Floor(a / b) * b); | |
} | |
// 角度を-180<x<180に変換 | |
public static float FixedAngle(float angle) | |
{ |
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; | |
namespace UniRx.GvrController | |
{ | |
public static class ObservableGvrController | |
{ | |
public static IObservable<GvrConnectionState> StateAsObservable() | |
{ | |
return Observable.EveryUpdate().Select(_ => GvrControllerInput.State).DistinctUntilChanged(); | |
} |
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.UI; | |
using UnityEngine.EventSystems; | |
using System.Collections.Generic; | |
using DG.Tweening; | |
public class AutoHideScrollRect : ScrollRect | |
{ | |
public List<Image> bars = new List<Image>(); | |
float beginDuration = 0.5f; |
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 UnityEngine.EventSystems; | |
using UnityKeyboard; | |
public class KeyboardManager : MonoBehaviour | |
{ | |
GameObject currentSelectable; | |
void Update() |
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; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
namespace WindowsTouchScreen | |
{ | |
public static class Keyboard | |
{ | |
static int WM_SYSCOMMAND = 0x0112; | |
static int SC_CLOSE = 0xF060; |
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; | |
public static class DebugTatsuya | |
{ | |
public static void Tatsuya(this Debug self, int count = 6) | |
{ | |
string output = ""; | |
for (int i = 0; i < count; ++i) | |
{ | |
output += "あ\""; |
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
// This Script refered to CircleDeployer.cs | |
// http://kan-kikuchi.hatenablog.com/entry/CircleDeployer | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class SofmapDeployer : MonoBehaviour | |
{ | |
// 子の大きさ |