コード例 #1
0
 public CanPowerDown(ActorInitializer init)
 {
     PowerManager = init.self.Owner.PlayerActor.Trait <PowerManager>();
     normalPower  = init.self.Info.Traits.Get <BuildingInfo>().Power;
 }
コード例 #2
0
ファイル: Building.cs プロジェクト: watsoncui/OpenRA
 public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner)
 {
     PlayerPower = newOwner.PlayerActor.Trait <PowerManager>();
 }
コード例 #3
0
 public RequiresPower(Actor self)
 {
     power = self.Owner.PlayerActor.Trait <PowerManager>();
 }