/// <summary> /// 各種オブジェクトの生成、初期化 /// </summary> public Player Init() { // プレースフォルダーを作成 this.folder = new GameObject("Player").transform; this.folder.parent = this.parent; // パズルを作成 this.puzzle = new Puzzle(this.folder, this.Location.Paw); this.puzzle.Init(); this.puzzle.OnVanished = OnVanished; // ゲージを生成 var props = new Gauges.Props(); props.Location = this.Location; props.Parent = this.folder; this.gauges = new Gauges(props).Init(); // 猫を生成 this.cat = MyGameObject.Create <Cat>("Cat", this.folder); this.cat.CacheTransform.position = this.Location.Cat; this.cat.Init(this.catType, this.Type == Define.App.Player.P2); // ユニークスキルを生成 this.unique = MyGameObject.Create <UniqueSkill>("Unique", this.folder); return(this); }
public static void Unload() { Gauges.Unload(); Puzzle.Unload(); UniqueSkill.Unload(); }
//------------------------------------------------------------------------- // Load, Unload public static void Load(System.Action pre, System.Action done) { Gauges.Load(pre, done); Puzzle.Load(pre, done); UniqueSkill.Load(pre, done); }