Exemplo n.º 1
0
 void Start()
 {
     thisRigidbody   = GetComponent <Rigidbody2D>();
     thisSpring      = GetComponent <SpringJoint2D>();
     slingRigidbody  = thisSpring.connectedBody;
     catapultCoursor = slingRigidbody.gameObject.GetComponentInParent <CatapultCoursor>();
     DelayToRelease  = 1 / (thisSpring.frequency * 5);
     myCatapult      = GetComponentInParent <Cathapult>();
 }
Exemplo n.º 2
0
    private void Reload()
    {
        Cathapult cathapult = slingRigidbody.gameObject.GetComponentInParent <Cathapult>();

        cathapult.LoadProjectile();
    }