/// <summary> /// here the point is being picked up when a player with a collider hits the pick up point's collider /// </summary> /// <param name="collision"></param> private void OnTriggerEnter2D(Collider2D collision) { // making sure that the one who hits the point is the player if (collision.gameObject.name == "Player") { // here the pick up point is added to the score count if the player picks it up scoreBoard.AddPoints(scorePoints); // here the pick up point is destroyed when it is picked gameObject.SetActive(false); } }
override public void AddCards(List <Card> list) { base.AddCards(list); int pts = 0; //add points from coins AnimateMoveCards(); foreach (var card in list) { pts += card.coinStash.coins.Count; } ScoreBoard.AddPoints(pts); }
private void HandleDeath() // called by string reference { if (!isPlayer) { scoreBoard.AddPoints(pointsPerKill); } Instantiate(deathFX, transform.position, transform.rotation, fxBucket.transform); if (addOns) { addOns.SetActive(false); } collIder.enabled = false; meshRenderer.enabled = false; if (isPlayer && sceneLoader) { sceneLoader.ReloadOnPlayerDeath(actionDelay); } else { Destroy(gameObject, actionDelay); } }
/// <summary> /// Add integer points to the player's score /// </summary> /// <param name="points">Points.</param> public void AddPoints(int points) { _score.AddPoints(points); }
private void UpScoreInTime() { scoreBoard.AddPoints(10); }
private void ProcessHit() { scoreBoard.AddPoints(pointsPerKill); hitsToKill--; }