コード例 #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
ファイル: RepairBridge.cs プロジェクト: reaperrr/OpenRA
        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
ファイル: RepairBridge.cs プロジェクト: wytsep/OpenRA
 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
ファイル: RepairBridge.cs プロジェクト: huwpascoe/OpenRA
 public RepairBridge(Actor self, Actor target, EnterBehaviour enterBehaviour)
     : base(self, target, enterBehaviour)
 {
     hut = target.Trait <BridgeHut>();
 }
コード例 #6
0
ファイル: RepairBridge.cs プロジェクト: RobotCaleb/OpenRA
 public RepairBridge(Actor self, Actor target)
     : base(self, target)
 {
     hut = target.Trait<BridgeHut>();
 }