Exemplo n.º 1
0
        public Prey(Actor self, Actor who)
        {
            info          = self.Info.TraitInfo <AcolytePreyInfo>();
            preyBuildings = info.TargetActors;

            target = who;
        }
Exemplo n.º 2
0
        public PreyActivity(Actor self, Actor dockact, bool facingDock, Dock d)
        {
            info       = self.Info.TraitInfo <AcolytePreyInfo>();
            wsb        = self.Trait <WithSpriteBody>();
            dockactor  = dockact;
            lockfacing = facingDock;
            playanim   = true;
            _d         = d;

            ticks    = self.Info.TraitInfo <AcolytePreyInfo>().leechinterval;
            resLayer = self.World.WorldActor.Trait <ResourceLayer>();

            externalCondition = dockact.TraitsImplementing <ExternalCondition>()
                                .FirstOrDefault(t =>
                                                t.Info.Condition == self.Info.TraitInfo <AcolytePreyInfo>().GrantsCondition&&
                                                t.CanGrantCondition(dockactor, self));
        }
Exemplo n.º 3
0
        public PreyActivity(Actor self, Actor dockact, bool facingDock, Dock d)
        {
            info       = self.Info.TraitInfo <AcolytePreyInfo>();
            wsb        = self.Trait <WithSpriteBody>();
            dockactor  = dockact;
            lockfacing = facingDock;
            playanim   = true;
            this.d     = d;

            ticks    = self.Info.TraitInfo <AcolytePreyInfo>().Leechinterval;
            resLayer = self.World.WorldActor.Trait <ResourceLayer>();

            conditionManager = self.Trait <ConditionManager>();
            token            = ConditionManager.InvalidConditionToken;
            condtion         = self.Info.TraitInfo <AcolytePreyInfo>().SelfEnabledCondition;

            resourceTypesPreres = self.Info.TraitInfo <AcolytePreyInfo>().ResourceTypesPreres;
            resourceExtraTimes  = self.Info.TraitInfo <AcolytePreyInfo>().ResourceExtraTimes;
        }
Exemplo n.º 4
0
 public FindPrey(Actor self)
 {
     info          = self.Info.TraitInfo <AcolytePreyInfo>();
     preyBuildings = info.TargetActors;
 }