public static void Create(Constants.GhostID id, Transform parent, Action <GhostController> callback) { var prefab = Resources.Load("Prefabs/Ghost/Ghost") as GameObject; var go = Instantiate(prefab, parent); var res = go.GetComponent <GhostController>(); var model = new GhostModel(10, true, true, true, true, true, true, true, true, true); res.Setup(model); callback(res); }
public void Setup(GhostModel model) { SetName(model.Name); }
public void Setup(GhostModel model) { _model = model; }
public void OnSelect(GhostModel model) { _infoPanel.Setup(model); }