예제 #1
0
파일: GameManager.cs 프로젝트: nhondi/Test
    public void Player1Scored()
    {
        P1Scored = false;

        Destroy(ballObject);
        P1Goal.Play();
        effect = particleObject1.GetComponent <Explosion>();
        effect.Boom();

        homeScore = homeScore + 1;
        UpdateScore();
    }
예제 #2
0
파일: GameManager.cs 프로젝트: nhondi/Test
    public void Player2Scored()
    {
        P2Scored = false;

        Destroy(ballObject);
        P2Goal.Play();
        effect = particleObject2.GetComponent <Explosion>();
        effect.Boom();

        awayScore = awayScore + 1;
        UpdateScore();
    }
예제 #3
0
    public void Crush(int damage = 1)
    {
        MainObject meteo = newMeteo.FindMeteo(gameObject);

        if (meteo == null)
        {
            return;
        }

        ScoringManager.meteo_Score += 50;
        /// health 줄이고
        meteo.health -= damage;

        /// 0 이면
        if (meteo.health < 1)
        {
            eff.Boom(gameObject.transform.position);
            meteoManager.RemoveMeteo(gameObject);
        }
    }