예제 #1
0
 public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour, string notification)
     : base(self, target, enterBehaviour)
 {
     this.target       = target;
     legacyHut         = target.TraitOrDefault <LegacyBridgeHut>();
     hut               = target.TraitOrDefault <BridgeHut>();
     this.notification = notification;
 }
예제 #2
0
        protected override bool TryStartEnter(Actor self, Actor targetActor)
        {
            enterActor     = targetActor;
            enterLegacyHut = enterActor.TraitOrDefault <LegacyBridgeHut>();
            enterHut       = enterActor.TraitOrDefault <BridgeHut>();

            // Make sure we can still repair the target before entering
            // (but not before, because this may stop the actor in the middle of nowhere)
            if (!CanEnterHut())
            {
                Cancel(self, true);
                return(false);
            }

            return(true);
        }
예제 #3
0
 public RepairBridge(Actor self, Actor target)
     : base(self, target)
 {
     hut = target.Trait <BridgeHut>();
 }
예제 #4
0
 public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour, string notification)
     : base(self, target, enterBehaviour)
 {
     hut = target.Trait <BridgeHut>();
     this.notification = notification;
 }
예제 #5
0
 public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour)
     : base(self, target, enterBehaviour)
 {
     hut = target.Trait <BridgeHut>();
 }
예제 #6
0
 public RepairBridge(Actor self, Actor target)
     : base(self, target)
 {
     hut = target.Trait<BridgeHut>();
 }