Пример #1
0
 public void Destroy()
 {
     MagnetHandler.DeRegisterMagnet(this);
     Destroy(gameObject);
 }
Пример #2
0
 public void Create(MagnetType type, float force)
 {
     this.type = type;
     GetComponent <Rigidbody>().AddRelativeForce(Vector3.forward * force);
     MagnetHandler.RegisterMagnet(this);
 }
Пример #3
0
 public void Create(MagnetType type, float force)
 {
     MagnetHandler.RegisterMagnet(this);
 }