Ejemplo n.º 1
0
        public SupportPowerManager(ActorInitializer init)
        {
            Self = init.Self;

            TechTree   = Self.Trait <TechTree>();
            RadarPings = Exts.Lazy(() => init.World.WorldActor.TraitOrDefault <RadarPings>());

            init.World.ActorAdded   += ActorAdded;
            init.World.ActorRemoved += ActorRemoved;
        }
Ejemplo n.º 2
0
        protected override void Created(Actor self)
        {
            var playerActor = self.Info.Name == "player" ? self : self.Owner.PlayerActor;

            techTree = playerActor.Trait <TechTree>();



            base.Created(self);
        }
Ejemplo n.º 3
0
        void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
        {
            techTree = newOwner.PlayerActor.Trait <TechTree>();

            if (Info.ResetOnOwnerChange)
            {
                faction = newOwner.Faction.InternalName;
            }

            Update();
        }
 public GrantConditionOnPrerequisiteManager(ActorInitializer init)
 {
     self     = init.Self;
     techTree = self.Trait <TechTree>();
 }