Skip to content

Instantly share code, notes, and snippets.

View LightGive's full-sized avatar
😡
Just Do It !!

Akase Matsuura LightGive

😡
Just Do It !!
View GitHub Profile
using UnityEngine;
using System.Collections;
/// <summary>
/// キャラクターコントローラー2D
/// アタッチした時以下を追加
/// ・Animator
/// ・Rigidbody2D
/// ・BoxCollider
/// ・SpriteRenderer
using UnityEngine;
using UnityEditor;
using System.Collections;
/// <summary>
/// エディタ拡張でマインスイーパーをやる
/// </summary>
public class MineSweeperEditor : EditorWindow{
private const int MINE_NUM = 15; //爆弾の数
using UnityEngine;
using UnityEditor;
using System.Collections;
/// <summary>
/// 電卓のエディタ拡張
/// </summary>
public class CalculatorEditor : EditorWindow
{
//ボタンのサイズ
using UnityEngine;
using UnityEditor;
using System;
/// <summary>
/// 名前のアルファベット順でソートする
/// </summary>
public class NameSort : BaseHierarchySort
{
public override int Compare(GameObject lhs, GameObject rhs)
@LightGive
LightGive / LocalizeUI.cs
Created January 25, 2016 06:44
UnityのUIのローカライズのエディタ拡張
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
#endif
/// <summary>
/// UIをローカライズさせるエディタ拡張
/// </summary>
@LightGive
LightGive / EnumToDropDown
Created October 6, 2017 08:34
Enumの値をUnityのDropDwonに設定するテストプログラム
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class EnumToDropDown : MonoBehaviour
{
[SerializeField]
private Dropdown dropDown;
/// <summary>
@LightGive
LightGive / Test2
Created October 27, 2017 07:35
斜方投射で頂点座標に達した時の座標の予測
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test2 : MonoBehaviour {
[SerializeField]
private Vector3 vec;
[SerializeField]
private GameObject dummySphere;
@LightGive
LightGive / Test3
Last active October 27, 2017 14:36
斜方投射の弾道予測の点を表示するスクリプト
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test3 : MonoBehaviour
{
//弾道を表示するための点のプレハブ
[SerializeField]
private GameObject dummyObjPref;
@LightGive
LightGive / NewTest3
Created October 27, 2017 14:44
斜方投射の弾道予測の点を表示するスクリプト(点が移動する演出を追加したバージョン)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test3 : MonoBehaviour
{
//弾道を表示するための点のプレハブ
[SerializeField]
private GameObject dummyObjPref;
@LightGive
LightGive / Test4
Created October 28, 2017 06:48
初速を加えてから地面に落ちるまでの時間を計算するスクリプト
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 初速を加えてから地面に落ちるまでの時間を計算する
/// </summary>
public class Test4 : MonoBehaviour
{
//初速