private void OnTriggerEnter(Collider other) { if (other == goalTrigger) { OnScore?.Invoke(); } }
private void Animation_OnMix(Cage cage) { List <Cage> deleteCages = Cages.Where(c => c.Number == -1).ToList(); for (int i = 0; i < deleteCages.Count; i++) { MainForm.Controls.Remove(deleteCages[i]); Cages.Remove(deleteCages[i]); } cage.ApplyNumber(); if (cage.Number > MaxNumberNow) { MaxNumberNow = cage.Number; } Score = new Score(args.GetLastScore().CountScore + cage.Number, CountMove); OnScore?.Invoke(args); if (cage.Number > 99) { cage.Font = new Font("Google Sans", 22, FontStyle.Regular); } if (cage.Number > 512) { cage.Font = new Font("Google Sans", 18, FontStyle.Regular); } if (cage.Number > 8192) { cage.Font = new Font("Google Sans", 14, FontStyle.Regular); } }
private void HandleInput() { if (Input.GetMouseButtonDown(0)) { isGrappling = true; } if (Input.GetMouseButton(0)) { if (isGrappling) { isGrappling = false; var clickResult = OnClicked?.Invoke(player.transform.position); if (clickResult.HasValue) { var joint = clickResult.Value.Item1; joint.connectedBody = player; OnAttach?.Invoke(joint.transform.position); TravelAmount = clickResult.Value.Item2 + 1; OnScore?.Invoke(TravelAmount); } } } if (Input.GetMouseButtonUp(0)) { OnRelease?.Invoke(); } }
void AttendBubble(GameObject bubble) { if (sequence.Peek() == bubble.GetComponent <SpriteRenderer>().sprite) { audioManager.PlayEnvironmentSound("BubbleExplosion"); Destroy(bubble); sequence.Dequeue(); OnScore.Invoke(); if (hits >= bubbleCount) { FinishGame(); } } else { OnFail.Invoke(); } }
private void QueMergeAnimation() { mAnimationDelayTicker.QueAction(() => { foreach (var item in mLastMergeBoxList) { int gridIndex = GetMapedInex(item.x, item.y); int value = GetGridValueByPoint(mGridPoints[item.x, item.y]); //Debug.Log ("merged value " + value + " at " + item + " for " + gridIndex); mGridBoxList[gridIndex].AnimateValue(value); OnMerge?.Invoke(item.x, item.y); OnScore?.Invoke(mGridPoints[item.x, item.y]); } mLastMergeBoxList.Clear(); }); mAnimationDelayTicker.Start(); }
public void NewGame(int CageCount = 2) { foreach (Cage cage in Cages) { MainForm.Controls.Remove(cage); } Cages.Clear(); IsWin = false; args.Clear(); CountMove = 0; MaxNumberNow = 0; OnScore?.Invoke(args); OnMove?.Invoke(args); for (int i = 0; i < CageCount; i++) { AddRandomCage(); } IsGameOver = false; CheckAutoMode(); }
/// <summary> /// Handles the event of the puck colliding with this <see cref="Goal"/>'s trigger. /// </summary> /// <param name="_"></param> private void Score(Collider2D _) { OnScore?.Invoke(); }
public void Score() { _totalPoints += basketballScorePoints; OnScore?.Invoke(); }
/// <summary> /// Scores for the player on the right side of the rink. /// </summary> private void ScoreRight() { _score.ScoreGoal(Player.RightPlayer); UpdateScoreVisuals(); OnScore?.Invoke(Player.RightPlayer, _score); }
public void ScoreUp() { OnScore?.Invoke(); }
public void Score() { ScoreCounter++; OnScore.Invoke(ScoreCounter); thisLevel.point.Add(TimeCounter); }
public override void OnAnyCollisionEnter(Component component, Type type) { OnScore?.Invoke(); }
public override void OnAnyCollisionEnter(Component component, Type type) { OnScore?.Invoke(); OnDie?.Invoke(this); Destroy(gameObject); }
public void ModifyScore(int points) { Score += points; OnScore?.Invoke(Score); }
protected void Score(float score) { OnScore?.Invoke(score); }
public void OnScorePress() { OnScore?.Invoke(); }