コード例 #1
0
 /// <summary>
 /// Removes a target from the list. This will typically be called an enemy is out of reach but should also be called when an enemy
 /// dies so that the camera does not follow it after the fact
 /// </summary>
 /// <param name="cameraFocusable"></param>
 public void RemoveSecondaryTargetToFollow(ICameraFocusable cameraFocusable)
 {
     if (secondaryTargetList.Contains(cameraFocusable))
     {
         secondaryTargetList.Remove(cameraFocusable);
     }
 }
コード例 #2
0
 /// <summary>
 /// Adds a secondary target to the list. Because it is added to the list, does not necessarily automatically
 /// make the camera follow it. The object must also be engaged with the player or in an active state
 /// </summary>
 /// <param name="cameraFocusable"></param>
 public void AddSecondaryTargetToFollow(ICameraFocusable cameraFocusable)
 {
     if (!secondaryTargetList.Contains(cameraFocusable))
     {
         secondaryTargetList.Add(cameraFocusable);
     }
 }
コード例 #3
0
ファイル: GuiFocusedReadout.cs プロジェクト: Maxii/UnityEntry
 private void CheckRetainedFocusDestroyed(ICameraFocusable focusable) {
     if (focusable != null && focusable.IsRetainedFocusEligible) {
         if (focusable == _retainedFocus) {
             RefreshReadout(string.Empty);
             _retainedFocus = null;
         }
     }
 }
コード例 #4
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        ICameraFocusable cameraFocusable = collision.GetComponent <ICameraFocusable>();

        if (cameraFocusable != null)
        {
            RemoveSecondaryTargetToFollow(cameraFocusable);
        }
    }
コード例 #5
0
ファイル: GuiFocusedReadout.cs プロジェクト: Maxii/UnityEntry
 private void TryRetainingFocus(ICameraFocusable focus) {
     if (focus != null && focus.IsRetainedFocusEligible) {
         _retainedFocus = focus;
         AItem itemWithData = (focus as Component).gameObject.GetSafeMonoBehaviourComponent<AItem>();
         string focusName = "No Data";
         if (itemWithData != null) {
             focusName = itemWithData.Data.Name;
         }
         RefreshReadout(focusName);
     }
 }
コード例 #6
0
ファイル: ATableWindow.cs プロジェクト: Maxii/CodeEnv.Master
 private void CloseScreenAndFocusOnItem(ICameraFocusable item) {
     GameObject doneButtonGo = gameObject.GetSingleComponentInChildren<InputModeControlButton>().gameObject;
     GameInputHelper.Instance.Notify(doneButtonGo, "OnClick");
     item.IsFocus = true;
 }
コード例 #7
0
 private void TryRetainingFocus(ICameraFocusable focus) {
     if (focus != null && focus.IsRetainedFocusEligible) {
         _retainedFocus = focus;
         RefreshReadout(focus.DebugName);
     }
 }
コード例 #8
0
ファイル: ATableRowForm.cs プロジェクト: Maxii/CodeEnv.Master
 public TableRowFocusUserActionEventArgs(ICameraFocusable itemToFocusOn) {
     ItemToFocusOn = itemToFocusOn;
 }