public void Player1Scored() { P1Scored = false; Destroy(ballObject); P1Goal.Play(); effect = particleObject1.GetComponent <Explosion>(); effect.Boom(); homeScore = homeScore + 1; UpdateScore(); }
public void Player2Scored() { P2Scored = false; Destroy(ballObject); P2Goal.Play(); effect = particleObject2.GetComponent <Explosion>(); effect.Boom(); awayScore = awayScore + 1; UpdateScore(); }
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); } }