Entries from 2015-09-14 to 1 day

カメラを振動

カメラを振動させる Unity Tips and Tricks: Camera Shake using UnityEngine; using System.Collections; public class CameraShake : MonoBehaviour { private Transform myTransform; private const float duration = 0.5f; private const float magnitud…

OnCollisionEnter,OnTriggerEnter

衝突判定、衝突した時に呼ばれる関数www40.atwiki.jpindie-du.hatenablog.com

Resources.Load

素材は、Resourcesにまとめて、スクリプトから名前を指定して呼び出す。 using UnityEngine; using System.Collections; using UnityEngine.UI; public class ResourceText : MonoBehaviour { private GameObject ImageObj; private const string ImageObjPa…

RequireComponent(typeof(SampleScriptB))

RequireComponentによるコンポーネントの追加忘れ防止 - Neareal

Rigidbody.isKinematic

docs.unity3d.com

[メソッド]小文字を大文字に変換する。ToUpper()

void OnDifficultyChanged (GameController.GameDifficulty difficulty) { string txt; switch (difficulty) { case GameController.GameDifficulty.Normal: txt = "Normal"; break; case GameController.GameDifficulty.Hard: txt = "Hard"; break; case Ga…

Invoke

【Unity初心者】指定した秒数後にメソッドを呼び出す

シーンの変更 "Application.LoadLevel"

シーンの文字列を指定する呼び出し方ではない方法 リスタートと次の面のロード - Unity雑記 Application.LoadLevel(Application.loadedLevel + 1);