public void Throw(HandlerComponent handler) { picked = false; handler.SetGrabbedObject(null); float force; switch (mySize) { case BoxSize.Small: force = 3; break; case BoxSize.Medium: force = 1.7f; break; case BoxSize.Large: force = 1.3f; break; default: force = 1.00f; break; } rigid.AddForce(handler.GetTransform().forward *FORCETHROW *force, ForceMode.VelocityChange); this.gameObject.layer = 11; PlayProductSound(); }
public void Interact(HandlerComponent handler) { picked = true; this.gameObject.layer = 9; this.transform.position = handler.GetTransform().position; handler.SetGrabbedObject(this); PlayProductSound(); }