private void MovedCharacterHandler(Character character, Vector2Int moveTo) { if (selectedCharacter == character) { selectedCharacter.OnMoved -= MovedCharacterHandler; selectedCharacter.Unselect(); selectedCharacter = null; } characterProvider.Move(moveTo, character); int countDeleteMatched = matcher.DeleteMatched(); if (countDeleteMatched == 0) { RandomSpawn(); } else { score.Add(countDeleteMatched); audioOwlSound.Play(); if (characterProvider.GetAllFillPosition().Count == 0) { RandomSpawn(); } saveGame.Save(); gameWorldInput.enabled = true; } }
void Search() { float x = Input.GetAxis("Horizontal"); charaProvider.Move(x, false); if (x == 0) { charaProvider.Stopping(); } else { charaProvider.Running(); } var jump = Input.GetKeyDown(KeyCode.Space); if (jump) { charaProvider.BeginJump(); } }