Entries from 2016-04-01 to 1 month

レトロゲームをオンラインエミュレータで遊ぶ

game-oldies.com

はてな記法のスーパー pre 記法 文字サイズ変更

pota.hatenablog.jp

【Unity ライブラリ】"Easy Save 2" : List型のデータを保存

配列型ではセーブできなかったのArray型でES2に保存。 (保存したいデータに、項目が複数ある場合は新しくクラスを作って、IDをつけて保存するのも一つの手段。) using UnityEngine; using System.Collections; using System.Collections.Generic; public c…

同じクラス内に同じ名前のメソッド

同じクラス内で、引数または、アクセス修飾子(private,public, etc)が違えば、同じ名前のメソッドを定義することができる。 using UnityEngine; using System.Collections; public class Test_SplashScreen : MonoBehaviour { public void Test(int id) { …

【C#】デリゲート(delegate) 使用例 第二弾

ufcpp.net using UnityEngine; using System.Collections; namespace Test { delegate void SomeDelegate(int a); class DelegateTest { public void Main() { SomeDelegate a = new SomeDelegate(A); a(256); } static void A(int n) { Debug.Log("delegate…

【C#】 Dictionary 使用例

qiita.comexample 1 { public class TestClass : MonoBehaviour { Dictionary<int, string> dic = new Dictionary<int, string>() { { 0, "today's weather is nice!" }, { 1, "today's weather is so so!" }, { 2, "today's weather is really nice!" }, }; void Start() { foreach(in</int,></int,>…

【C#】スコープを浅くする

スコープが深いと読みづらい良くない例 if (item[i]._levelId == 0){ if (item[i]._stageId == 1){ // null }else{ _iStagePre.SetSprite(item[i - 1]._stageInGame); } }else{ _iStagePre.SetSprite(item[i - 1]._stageInGame); } _iStageNow .SetSprite(it…