This file contains 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 CameraChasingTargetScript : MonoBehaviour { | |
// Target Object | |
public GameObject targetObject; | |
// Use this for initialization | |
void Start () { | |
This file contains 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 SceceChangeGUIScript : MonoBehaviour { | |
// GUIに使うSkin | |
public GUISkin skin; | |
// 切り替え先のScene名 | |
public string sceneName = ""; | |
// ボタンの名前 | |
public string buttonLabel = ""; |
This file contains 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 PlayerControlScript : MonoBehaviour { | |
// 速度 | |
public Vector2 SPEED = new Vector2(0.05f, 0.05f); | |
// Use this for initialization | |
void Start () { | |
} |
This file contains 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 Collision2DScript : MonoBehaviour { | |
// 切り替え先のScene名を格納している配列 | |
public string[] sceneName; | |
// 衝突したオブジェクト名を格納している配列 | |
public string[] objectName; | |
// Use this for initialization | |
void Start () { |
This file contains 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 TargetMoveScript : MonoBehaviour { | |
// 速度 | |
public Vector2 speed = new Vector2(0.05f, 0.05f); | |
// ターゲットとなるオブジェクト | |
public GameObject targetObject; | |
// ラジアン変数 | |
private float rad; |
This file contains 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 ClickPositionCreatePrefabScript : MonoBehaviour { | |
// 生成したいPrefab | |
public GameObject Prefab; | |
// クリックした位置座標 | |
private Vector3 clickPosition; | |
// Use this for initialization | |
void Start () { |
This file contains 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 CreateScrollViewGUIScript : MonoBehaviour { | |
// GUIに使うSkin | |
public GUISkin skin; | |
// スクロールの現在位置 | |
public Vector2 scrollViewVector = Vector2.zero; | |
// position : 表示位置 |
This file contains 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 GameDataStorageScript : MonoBehaviour { | |
private static bool created = false; | |
int score = 0; | |
void Awake(){ | |
if(!created){ | |
// シーンを切り替えても指定のオブジェクトを破棄せずに残す |
This file contains 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 FadeOutScript : MonoBehaviour { | |
Color alpha = new Color(0, 0, 0, 0.01f); | |
// Use this for initialization | |
void Start () { | |
} | |
This file contains 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 MouseSynchronizeObjectScript : MonoBehaviour { | |
// 位置座標 | |
private Vector3 position; | |
// スクリーン座標をワールド座標に変換した位置座標 | |
private Vector3 screenToWorldPointPosition; | |
// Use this for initialization | |
void Start () { |
OlderNewer