public void SetMaterial(string mainTex, string alpha) { PuzzleModel model = new PuzzleModel(); _mat.material.SetTexture("_MainTex", model.GetMain(mainTex)); _mat.material.SetTexture("_Alpha", model.GetAlpha(ref alpha)); this.SetTopSide(Int32.Parse("" + alpha[0])); this.SetBottomSide(Int32.Parse("" + alpha[1])); this.SetLeftSide(Int32.Parse("" + alpha[2])); this.SetRightSide(Int32.Parse("" + alpha[3])); }
public static void GameEnd(int pid, int size) { PuzzleModel pm = new PuzzleModel(); switch (size) { case 1: pm.SaveEndGame(pid, "low"); break; case 2: pm.SaveEndGame(pid, "mid"); break; case 3: pm.SaveEndGame(pid, "high"); break; } }
public DTOSearchResult SearchWord(DTOSearch word) { if (word != null) { PuzzleModel puzzle = new PuzzleModel(); puzzle.FillPuzzle(word.puzzle.Select(E => string.Concat(E)).ToList()); var z = puzzle.ContainsWord(word.word); DTOSearchResult result = new DTOSearchResult() { Word = word.word, Breakdown = z.Reverse().ToList() }; return(result); } return(null); }
public void actionStart(string name) { GameObject size = GameObject.Find("Canvas").transform.Find("main").Find("PuzzlePanel").Find("size").gameObject; Debug.Log(size.GetComponent <Dropdown>().value); int sz = size.GetComponent <Dropdown>().value + 1; GameModel model = new GameModel(); PuzzleModel pm = new PuzzleModel(); pm.GetByName(name); if (sz == 3 && pm.mid == 0) { GameObject warning = GameObject.Find("Canvas").transform.Find("main").Find("PuzzlePanel").Find("Warning").gameObject; warning.SetActive(true); } else { model.Set(pm.id, sz); Application.LoadLevel(C._GAME_PLAY_); } }
/// <summary> /// ControllerPuzzle constructor /// </summary> public ControllerPuzzle(PuzzleType puzz) { this.puz = new PuzzleModel(); this.puzView = puzz; }
public PuzzleViewModel() { Model = new PuzzleModel(); Cells = new CellList(CellChanged_EventHandler); ClearCommand = new RelayCommand(ClearCommandHandler, o => !Model.PuzzleIsEmpty); }
public MainWindow() { InitializeComponent(); model = PuzzleModel.Source; this.DataContext = model; }
public void CompleteAlignedPuzzles(PuzzleModel puzzleModel) { _puzzleViewmodel.CompleteAlignedPuzzles(puzzleModel); }