void Fire() { isShooting = true; Invoke("ResetShooting", 1f); GameObject newShot = Instantiate(cannonShot, transform.position, Quaternion.identity); if (doShootLeft) { newShot.transform.localRotation = Quaternion.Euler(0, 0, -180); newShot.GetComponent <CannonShot>().rb.velocity = newShot.GetComponent <CannonShot>().moveSpeed *transform.right * -1; } newShot.transform.parent = transform; if (isFuture) { parent.ForceGoToPast(); } }
void OnBreak() { baseTimeObject.ForceGoToPast(); Initialize(); }