Entries from 2016-04-01 to 1 month
game-oldies.com
pota.hatenablog.jp
配列型ではセーブできなかったの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) { …
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…
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,>…
スコープが深いと読みづらい良くない例 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…