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.Collections; | |
using UnityEngine; | |
public class RotateCubeTest : MonoBehaviour | |
{ | |
const float RotatingSpeed = 0.2f; | |
const float RotatingAngle = 90f; | |
Vector3 halfSize; | |
float time = 0f; | |
Vector3 axis = Vector3.zero; |
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
#if DEBUG_OVERWRAP | |
using UnityEngine; | |
using System.Diagnostics; | |
using UnityDebug = UnityEngine.Debug; | |
using UnityObject = UnityEngine.Object; | |
/// <summary> | |
/// 条件付きのUnityEngine.Debugクラス | |
/// </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
namespace Singleton | |
{ | |
/// <summary> | |
/// シングルトン基底クラス(MonoBehaviour非継承) | |
/// </summary> | |
public abstract class Singleton<T> where T : class, new() | |
{ | |
public static readonly T Instance = new T(); | |
} | |
} |
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 Singleton | |
{ | |
/// <summary> | |
/// シングルトン基底クラス(MonoBehaviour継承) | |
/// </summary> | |
public abstract class SingletonMonoBehaviour<T> : MonoBehaviour where T : SingletonMonoBehaviour<T> | |
{ | |
static T instance; |
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
// "Sprites/Default"のドカベンロゴアニメーション版 | |
Shader "Dokaben/Sprites/Title-Animation" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 | |
[HideInInspector] _RendererColor ("RendererColor", Color) = (1,1,1,1) |
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.Reflection; | |
using UnityEditor; | |
/// <summary> | |
/// 阿部寛のホームページを表示するためのEditor拡張 | |
/// </summary> | |
public static class AbeHirosh_HP_Window | |
{ | |
[MenuItem(@"Window/阿部寛のホームページ")] | |
static void Open() |
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
class Object | |
{ | |
float _mass; | |
PVector _location; | |
PVector _velocity; | |
PVector _acceleration; | |
float _G; | |
Object(float mass, float x, float y) | |
{ |
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
// Nature of Code : Chapter5 参照 | |
import toxi.physics2d.behaviors.*; | |
import toxi.physics2d.*; | |
import toxi.geom.*; | |
import toxi.math.*; | |
VerletPhysics2D physics; | |
Blanket blanket; |
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
// 参考サイト | |
// ・セルラーノイズ | |
// https://thebookofshaders.com/12/?lan=jp | |
Shader "Custom/WorleyNoise" | |
{ | |
CGINCLUDE | |
#include "UnityCG.cginc" | |
float2 random2(fixed2 st) |
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
// Inspectorに表示されている配列の要素をソートするサンプル | |
namespace MainContents.Test | |
{ | |
using UnityEngine; | |
using System.Collections; | |
[CreateAssetMenu(menuName = "ScriptableObjects/InspectorArraySortTest", fileName = "InspectorArraySortTest")] | |
public class InspectorArraySortTest : ScriptableObject | |
{ |
OlderNewer