예제 #1
0
    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();
        }
    }
예제 #2
0
 void OnBreak()
 {
     baseTimeObject.ForceGoToPast();
     Initialize();
 }