Esempio n. 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;
 }
Esempio n. 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);
        }
Esempio n. 3
0
 public RepairBridge(Actor self, Actor target)
     : base(self, target)
 {
     hut = target.Trait <BridgeHut>();
 }
Esempio n. 4
0
 public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour, string notification)
     : base(self, target, enterBehaviour)
 {
     hut = target.Trait <BridgeHut>();
     this.notification = notification;
 }
Esempio n. 5
0
 public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour)
     : base(self, target, enterBehaviour)
 {
     hut = target.Trait <BridgeHut>();
 }
Esempio n. 6
0
 public RepairBridge(Actor self, Actor target)
     : base(self, target)
 {
     hut = target.Trait<BridgeHut>();
 }