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 System; | |
using UnityEngine; | |
using Random = UnityEngine.Random; | |
namespace hoge | |
{ | |
/// <summary> | |
/// シェイク処理 | |
/// </summary> | |
public class Shaker : IDisposable |
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 UnityEngine.UI; | |
/// <summary> | |
/// テキストのサイズ調整を行うコンポーネントです | |
/// </summary> | |
[ExecuteInEditMode] | |
[DisallowMultipleComponent] | |
[RequireComponent(typeof(Text))] | |
public class TextSizeAdjuster : MonoBehaviour |
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
public class Hoge | |
{ | |
public static implicit operator bool(Hoge self) | |
{ | |
return self != null; | |
} | |
public static bool operator true(Hoge self) | |
{ | |
return self != null; |
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 System.Collections.Generic; | |
using UnityEngine.Events; | |
namespace IW.UnityActionEvent | |
{ | |
/// <summary> | |
/// Extensionメソッド郡. | |
/// </summary> | |
public static class UnityActionWrapperExtension | |
{ |
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 System; | |
using UnityEngine; | |
using System.Collections; | |
using System.Text.RegularExpressions; | |
namespace Griphone.Agito.Sandbox | |
{ | |
public class RegexSample : MonoBehaviour | |
{ | |
// 正規表現のターゲット文字列. |
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
/*** 使用例 ***/ | |
var OnDamage = new UnityActionWrapper<int>(); | |
// ダメージ通知の関数を登録. | |
OnDamage += (damage) => { Player.SetDamage(damage); }; | |
// 実際にダメージを与える | |
OnDamage.Invoke(100); | |
// ~~~ (略) ~~~ |
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 System; | |
using System.IO; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
namespace Griphone.Agito.EditorExtension | |
{ |
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 UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine.SceneManagement; | |
using System; | |
using System.IO; | |
using System.Linq; | |
/// <summary> | |
/// シーン操作クラス | |
/// </summary> |
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; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
public class RuntimeCharacterAtlasTest : MonoBehaviour | |
{ | |
public Texture2D BodyTex; | |
public Texture2D HairTex; | |
public Texture2D EyeTex; |