예제 #1
0
 /// <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);
     }
 }
예제 #2
0
    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);
    }
예제 #3
0
 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);
     }
 }
예제 #4
0
 /// <summary>
 /// Add integer points to the player's score
 /// </summary>
 /// <param name="points">Points.</param>
 public void AddPoints(int points)
 {
     _score.AddPoints(points);
 }
예제 #5
0
 private void UpScoreInTime()
 {
     scoreBoard.AddPoints(10);
 }
예제 #6
0
 private void ProcessHit()
 {
     scoreBoard.AddPoints(pointsPerKill);
     hitsToKill--;
 }