Skip to content

Instantly share code, notes, and snippets.

@KRNKRS
KRNKRS / MyPlugin.jslib
Created August 8, 2018 11:11
MyPlugin.jslib
mergeInto(LibraryManager.library, {
OpenToBlankWindow: function (_url) {
window.open(Pointer_stringify(_url),'_blank')
},
});
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
[DisallowMultipleComponent]
public class FadeController : MonoBehaviour {
private const string COROUTINE_NAME = "AlphaTransition";
@KRNKRS
KRNKRS / FadeController.cs
Last active April 20, 2018 02:37
フェードイン / アウトの挙動をUI含め1スクリプトで制御する
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
[DisallowMultipleComponent]
public class FadeController : MonoBehaviour {
private const string COROUTINE_NAME = "AlphaTransition";
//マネージャクラス(オブジェクトにアタッチするのはこれだけ)
public class HogeManager : MonoBehaviour
{
//変数定義
[SerializeField]
private int intHoge1;
[SerializeField]
private int intHoge2;
//Property定義
public class Hoge
{
public int intValue1;
public int intValue2;
}
#if UNITY_EDITOR
[CustomEditor(typeof(Hoge))]
public class HogeEditor1 : Editor
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraFollow : MonoBehaviour {
public float moveSpeed = 3;
public float rotateSpeed = 3;
private GameObject lookTarget;
private GameObject cameraPositionTarget;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Rigidbody))]
public class PlayerMove : MonoBehaviour {
private Rigidbody rb;
public float speed = 20;
public float QBPower = 120;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraOffset : MonoBehaviour
{
public float moveSpeed = 2;
private GameObject playerObj;
private Vector3 offset;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraRotate : MonoBehaviour {
public float sensitivity = 1.0f;
public bool reverseX = true;
public float clampAngle = 60;
private GameObject followTarget;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraFollow : MonoBehaviour {
public float moveSpeed = 3;
public float rotateSpeed = 3;
private GameObject lookTarget;
private GameObject cameraPositionTarget;