//Check the Distance between two Vectors private bool CheckDistance() { //if(Vector2.Distance(paintHead, playerHead) < distanceToCheck) if (playerUpPivot.position.y > pivotUp.position.y) { //Win Conditions here //Check if the player Win the Last CheckPoint if (lastPaintPail == true) { GameManager.instance.inLastCheckPoint = true; } OnGameOver?.Invoke(false); if (inCheckMode == true) { OnScoreIncrease?.Invoke(true, 1); inCheckMode = false; } return(true); } else { //Lose Conditions here OnGameOver?.Invoke(true); if (inCheckMode == true) { OnScoreIncrease?.Invoke(false, 0); inCheckMode = false; } return(false); } }
public async void AttemptWriteScore(Inventory inventory) { Score currentScore = inventory.ToScore(); ScoreEntity scoreEntity = new ScoreEntity(SystemInfo.deviceUniqueIdentifier, SystemInfo.deviceName); scoreEntity.FromScore(currentScore); if (currentScore > maxScore) { Task <ScoreEntity> write = WriteScore(scoresTable, scoreEntity); UpdateLocalTable(scoreEntity); if (machineToNameMap.ContainsKey(SystemInfo.deviceName)) { OnScoreIncrease?.Invoke(); } await write; } }
public void IncreaseScore(int _value) { value += _value; OnScoreIncrease?.Invoke(this.value); }
public void AddNewAppleScore() { OnScoreIncrease?.Invoke(scoreIncrease: scorePerApple); }
public void AddNewKnifeScore() { OnScoreIncrease?.Invoke(scoreIncrease: scorePerKnife); }
public void IncreaseScore(int score) => OnScoreIncrease?.Invoke(score);