public DeployToUpgrade(Actor self, DeployToUpgradeInfo info) { this.self = self; this.info = info; manager = self.Trait <UpgradeManager>(); checkTerrainType = info.AllowedTerrainTypes.Length > 0; }
public DeployToUpgrade(Actor self, DeployToUpgradeInfo info) { this.self = self; this.info = info; manager = self.Trait <UpgradeManager>(); checkTerrainType = info.AllowedTerrainTypes.Count > 0; canTurn = self.Info.HasTraitInfo <IFacingInfo>(); body = Exts.Lazy(self.TraitOrDefault <ISpriteBody>); }
public DeployToUpgrade(ActorInitializer init, DeployToUpgradeInfo info) { this.self = init.Self; this.info = info; manager = self.Trait <UpgradeManager>(); checkTerrainType = info.AllowedTerrainTypes.Count > 0; canTurn = self.Info.HasTraitInfo <IFacingInfo>(); body = Exts.Lazy(self.TraitOrDefault <WithSpriteBody>); if (init.Contains <DeployStateInit>()) { deployState = init.Get <DeployStateInit, DeployState>(); } }