void INotifyCreated.Created(Actor self)
        {
            // Special case handling is required for the Player actor.
            // Created is called before Player.PlayerActor is assigned,
            // so we must query other player traits from self, knowing that
            // it refers to the same actor as self.Owner.PlayerActor
            var playerActor = self.Info.Name == "player" ? self : self.Owner.PlayerActor;

            globalManager    = playerActor.Trait <GrantConditionOnPrerequisiteManager>();
            conditionManager = self.TraitOrDefault <ConditionManager>();
        }
 void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
 {
     globalManager = newOwner.PlayerActor.Trait <GrantConditionOnPrerequisiteManager>();
 }
Esempio n. 3
0
 void INotifyCreated.Created(Actor self)
 {
     globalManager = self.Owner.PlayerActor.Trait <GrantConditionOnPrerequisiteManager>();
 }
Esempio n. 4
0
 public GrantConditionOnPrerequisite(Actor self, GrantConditionOnPrerequisiteInfo info)
 {
     this.info     = info;
     globalManager = self.Owner.PlayerActor.Trait <GrantConditionOnPrerequisiteManager>();
 }