コード例 #1
0
ファイル: UserRepository.cs プロジェクト: fathurxzz/aleqx
 private PlanetFacility InitializeFacility(FacilityItem facilityItem)
 {
     return new PlanetFacility
     {
         FacilityId = (int)facilityItem,
         IsUpdating = false,
         PlanetId = _planetId,
         Level = 0,
         UpdateStart = DateTime.Now
     };
 }
コード例 #2
0
ファイル: StarbaseCreator.cs プロジェクト: Maxii/UnityEntry
 private FacilityCategory GetShipHull(FacilityItem ship) {
     return Enums<FacilityCategory>.Parse(ship.gameObject.name);
 }
コード例 #3
0
 private void UponOrderOutcome(FacilityDirective directive, FacilityItem facility, bool isSuccess, IElementAttackable target, UnitItemOrderFailureCause failCause) {
     RelayToCurrentState(directive, facility, isSuccess, target, failCause);
 }
コード例 #4
0
 /// <summary>
 /// Handles the results of the facility's attempt to execute the provided directive.
 /// </summary>
 /// <param name="directive">The directive.</param>
 /// <param name="facility">The facility.</param>
 /// <param name="isSuccess">if set to <c>true</c> the directive was successfully completed. May still be ongoing.</param>
 /// <param name="target">The target. Can be null.</param>
 /// <param name="failCause">The failure cause if not successful.</param>
 internal void HandleOrderOutcome(FacilityDirective directive, FacilityItem facility, bool isSuccess, IElementAttackable target = null, UnitItemOrderFailureCause failCause = UnitItemOrderFailureCause.None) {
     UponOrderOutcome(directive, facility, isSuccess, target, failCause);
 }
コード例 #5
0
 protected void ExecuteAttackOrder_UponOrderOutcome(FacilityDirective directive, FacilityItem facility, bool isSuccess, IElementAttackable target, UnitItemOrderFailureCause failCause) {
     LogEvent();
     if (directive != FacilityDirective.Attack) {
         D.Warn("{0} State {1} erroneously received OrderOutcome callback with {2} {3}.", DebugName, CurrentState.GetValueName(), typeof(FacilityDirective).Name, directive.GetValueName());
         return;
     }
     // TODO What? It will be common for an attack by a facility to fail for cause unreachable as its target moves out of range...
 }
コード例 #6
0
ファイル: StarBasePresenter.cs プロジェクト: Maxii/UnityEntry
 private void OnFleetElementDestroyed(FacilityItem ship) {
     if (ship.gameObject.GetSafeInterface<ICameraFocusable>().IsFocus) {
         // our fleet's ship that was just destroyed was the focus, so change the focus to the fleet
         (View as ICameraFocusable).IsFocus = true;
     }
 }
コード例 #7
0
 public FacilityCtxControl_AI(FacilityItem facility)
     : base(facility.gameObject, uniqueSubmenusReqd: Constants.Zero, menuPosition: MenuPositionMode.Offset) {
     _facilityMenuOperator = facility;
 }