Skip to content

Instantly share code, notes, and snippets.

Avatar

Seibe TAKAHASHI seibe

  • Kanagawa, Japan
View GitHub Profile
@seibe
seibe / Boot.cs
Last active Jan 19, 2020
GameCanvasでマルチシーンのサンプルコード
View Boot.cs
using GameCanvas;
/// <summary>
/// ブート画面
/// </summary>
public sealed class Boot : IScene
{
private float mEnterTime;
public Boot()
@seibe
seibe / Debug.cs
Created Dec 9, 2018
ログごとにスタックトレースの有無を切り替えられる Debug.cs
View Debug.cs
public static class Debug
{
public static void LogError(object message, UnityEngine.StackTraceLogType stackTraceType = UnityEngine.StackTraceLogType.ScriptOnly)
{
LogInternal(UnityEngine.LogType.Error, message, stackTraceType);
}
public static void LogWarning(object message, UnityEngine.StackTraceLogType stackTraceType = UnityEngine.StackTraceLogType.ScriptOnly)
{
LogInternal(UnityEngine.LogType.Warning, message, stackTraceType);
@seibe
seibe / Main-new.cs
Created Apr 7, 2018
GameCanvas のコルーチン対応
View Main-new.cs
using Sequence = System.Collections.IEnumerator;
/// <summary>
/// ゲームクラス。
/// 学生が編集すべきソースコードです。
/// </summary>
public sealed class Game : GameBase
{
/// <summary>
@seibe
seibe / EditorTextureUtil.cs
Created Aug 7, 2017
UnityEditor.TextureUtil アクセサ
View EditorTextureUtil.cs
using System.Reflection;
using UnityEngine;
using UnityEngine.Assertions;
/// <summary>
/// <see cref="UnityEditor.TextureUtil"/> Accessor
/// </summary>
/// <author>Seibe TAKAHASHI</author>
/// <remarks>
View TypeChecker.cs
/// <summary>TypeCheckerTest</summary>
/// <author>Seibe TAKAHASHI</author>
/// <remarks>
/// (c) 2017 Seibe TAKAHASHI.
/// This software is released under the MIT License.
/// http://opensource.org/licenses/mit-license.php
/// </remarks>
public class TypeCheckerTest
{
[UnityEditor.MenuItem("TypeChecker/SpriteRenderer")]
@seibe
seibe / Main.cs
Last active Aug 29, 2015
「uGUI/Texture2Dで描画するリアルタイム流体計算」 最終的なソースコード (http://tasogare-games.hatenablog.jp/entry/20150428/1430203599)
View Main.cs
using UnityEngine;
using UnityEngine.UI;
public class Main : MonoBehaviour
{
public RawImage raw;
public int N = 64;
public float diff = 0.0f;
public float visc = 0.0f;
public float force = 5.0f;
@seibe
seibe / FluidMath.cs
Created Apr 27, 2015
Stable Fluid for C# ()
View FluidMath.cs
/**
* Jos Stam's Stable Fluids (for C#)
**/
public static class FluidMath
{
public static void VelStep(int N, ref float[] u, ref float[] v, ref float[] u0, ref float[] v0, float visc, float dt)
{
AddSource(N, ref u, ref u0, dt);
AddSource(N, ref v, ref v0, dt);
@seibe
seibe / Main.cs
Created Apr 21, 2015
「ゲームオブジェクトひとつだけで作るアナログ時計」 (http://tasogare-games.hatenablog.jp/entry/20150422/1429632127)
View Main.cs
using UnityEngine;
using System;
using System.Collections;
public class Main : MonoBehaviour
{
private Transform hours, minutes, seconds;
private const float
hoursToDeg = -360f / 12f,
minutesToDeg = -360f / 60f,
You can’t perform that action at this time.