예제 #1
0
 protected override bool TryIsSelectedItemUserRemoteBase(ISelectable selected, out AUnitBaseCmdItem selectedBase) {
     selectedBase = selected as AUnitBaseCmdItem;
     return selectedBase != null && selectedBase.IsUserOwned;
 }
예제 #2
0
 public BaseCtxControl_AI(AUnitBaseCmdItem baseCmd)
     : base(baseCmd.gameObject, uniqueSubmenusReqd: Constants.Zero, menuPosition: MenuPositionMode.Over) {
     _baseMenuOperator = baseCmd;
 }
예제 #3
0
 /// <summary>
 /// Called when this menu is right clicked while an Item is selected, returns <c>true</c> if the Item selected is a user-owned, remote base.
 /// Default implementation is to return false. Derived classes should override this behaviour to enable the type of access their menu supports.
 /// </summary>
 /// <param name="selected">The Item currently selected.</param>
 /// <param name="selectedBase">The user-owned, selected base, if any.</param>
 /// <returns></returns>
 protected virtual bool TryIsSelectedItemUserRemoteBase(ISelectable selected, out AUnitBaseCmdItem selectedBase) {
     selectedBase = null;
     return false;
 }