Пример #1
0
 private void Awake( )
 {
     if (!_EVENT)            //sets up the singleton.
     {
         _EVENT = this;
     }
 }
Пример #2
0
 private void Start( )
 {
     rb = rb ?? GetComponent <Rigidbody>();
     rb.AddTorque(Random.insideUnitSphere, ForceMode.VelocityChange);
     rb.AddForce(Random.insideUnitSphere, ForceMode.Impulse);
     health = 10 * Size;
     EventHandeler.TriggerAsteroidSpawn(this);
 }
Пример #3
0
 public void AddDamage(int points)
 {
     health -= points;
     EventHandeler.TriggerAsteroidDamage(this);
 }