void OnMouseDown() { if (GetIsHited() == false && GetIsShowing() == true) { SetIsHited(true); GetCharacterAnimation().GoTo(Character.STATE_HITED); SoundManager.PlaySoundByName(SoundConstants.SFX_CORRECT_HIT); //CharacterManager.Instance.HideCharacter(character); PointsController.AddPoints(PointsController.GetPointsToAdd()); FindObjectOfType <IndexController>().AddObjectToLIstByIndex(GetCharacterAnimation().GetState(Character.STATE_HITED).gameObject, GetIndex()); } }
private void OnClick(GameObject go) { if (go.GetComponent <Character>().GetIsHited() == false && go.GetComponent <Character>().GetIsShowing() == true) { Character character = go.GetComponent <Character>(); character.SetIsHited(true); character.GetCharacterAnimation().GoTo(Character.STATE_HITED); SoundManager.PlaySoundByName(SoundConstants.SFX_CORRECT_HIT); //CharacterManager.Instance.HideCharacter(character); PointsController.AddPoints(PointsController.GetPointsToAdd()); } }
public void Win() { if (GameWon) { return; } GameWon = true; _winScreen.SetActive(true); _inputHandlingBlocker.SetAllowedInputs(InputSource.None); _sceneMusicSource.Stop(); _nextFightController.CompleteLocation(); _pointsController.StopAddingPoints(); _pointsController.AddPoints(_pointsController.Data.PointsForWin); _pointsController.FinalizePoints(); }
public void JumperSaved() { pointsView.AddPoints(); }
public void AddPoints(float val) { pointsController.AddPoints(val); }