コード例 #1
0
 /// <summary>
 /// Initilaise the aiming of the given item.
 /// </summary>
 /// <param name="itemBeingAimed"></param>
 public void AimItem(AimableItem itemBeingAimed, Inventory itemBeingAimedInventory)
 {
     this.itemBeingAimed          = itemBeingAimed;
     this.itemBeingAimedInventory = itemBeingAimedInventory;
     if (mouseRotatedFocusingCamera != null)
     {
         mouseRotatedFocusingCamera.lockRotation = true;
     }
 }
コード例 #2
0
    IEnumerator WaitThenFire(Vector3 aimPoint)
    {
        yield return(new WaitForSeconds(waitTime));

        itemBeingAimed.Fire(userTransform, aimPoint);
        Debug.Log("fire");
        itemBeingAimed = null;
        if (mouseRotatedFocusingCamera != null)
        {
            mouseRotatedFocusingCamera.lockRotation = false;
        }
    }