static Atmospherics() { var protoMan = IoCManager.Resolve <IPrototypeManager>(); GasPrototypes = new GasPrototype[TotalNumberOfGases]; for (var i = 0; i < TotalNumberOfGases; i++) { GasPrototypes[i] = protoMan.Index <GasPrototype>(i.ToString()); } }
static Atmospherics() { var protoMan = IoCManager.Resolve <IPrototypeManager>(); GasPrototypes = new GasPrototype[TotalNumberOfGases]; GasOverlays = new SpriteSpecifier[TotalNumberOfGases]; for (var i = 0; i < TotalNumberOfGases; i++) { var gasPrototype = protoMan.Index <GasPrototype>(i.ToString()); GasPrototypes[i] = gasPrototype; if (string.IsNullOrEmpty(gasPrototype.GasOverlaySprite) && !string.IsNullOrEmpty(gasPrototype.GasOverlayTexture)) { GasOverlays[i] = new SpriteSpecifier.Texture(new ResourcePath(gasPrototype.GasOverlayTexture)); } if (!string.IsNullOrEmpty(gasPrototype.GasOverlaySprite) && !string.IsNullOrEmpty(gasPrototype.GasOverlayState)) { GasOverlays[i] = new SpriteSpecifier.Rsi(new ResourcePath(gasPrototype.GasOverlaySprite), gasPrototype.GasOverlayState); } } }