Exemple #1
0
 void OnTriggerEnter2D(Collider2D c)
 {
     if (!_isPlayer)
     {
         return;
     }
     if (c.tag != "DamageObject")
     {
         return;
     }
     ScoreCounter.Count();
 }
        public EvaluatedTips CountScore(int bonusForCorrectPlace, int countOfTippedPlaces)
        {
            var providedTips        = new ProvidedTipsReader(ProvidedTipsFileName).Read();
            int countOfProvidedTips = providedTips.Count;
            var evaluatedTips       = new EvaluatedTips();
            CandidateNameElectionGainPairs electionResults = new ElectionResultsReader(ElectionResultsFileName).Read();
            ScoreCounter scoreCounter = new ScoreCounter(electionResults, bonusForCorrectPlace);

            for (int i = 0; i < countOfProvidedTips; i++)
            {
                double score = scoreCounter.Count(providedTips[i], countOfTippedPlaces);
                evaluatedTips.Add(new EvaluatedTip(providedTips[i].TipperName, score));
            }
            return(evaluatedTips);
        }
Exemple #3
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.tag == "Player" || collision.tag == "goodPaint")
        {
            if (collision.tag == "Player")
            {
                GameObject.Find("PlayerAudio").GetComponent <PlayerAudio>().PlaySplat();
            }



            if (touched.notBad == false)
            {
                activate.Count();
            }


            touched.notBad = true;
            // Debug.Log("jump" +turnedGood);
            //transform.gameObject.tag = "good";
        }
    }