Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- Placeables
- Player
- Shop
- Sounds
- Specializations
- Triggers
- Utils
- Vehicles
- Weather
Engine v1.7.1.0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- XML
- general
Foundation Reference
ParticleSystemManager
DescriptionThis class handles all particlesParent
AbstractManagerFunctions
initDataStructures
DescriptionInitialize data structuresDefinition
initDataStructures()Code
27 | function ParticleSystemManager:initDataStructures() |
28 | self.nameToIndex = {} |
29 | self.particleTypes = {} |
30 | self.particleSystems = {} |
31 | end |
loadMapData
DescriptionLoad data on map loadDefinition
loadMapData()Return Values
boolean | true | if loading was successful else false |
36 | function ParticleSystemManager:loadMapData() |
37 | ParticleSystemManager:superClass().loadMapData(self) |
38 | |
39 | self:addParticleType("unloading") |
40 | self:addParticleType("smoke") |
41 | self:addParticleType("chopper") |
42 | self:addParticleType("straw") |
43 | self:addParticleType("cutter_chopper") |
44 | self:addParticleType("soil") |
45 | self:addParticleType("soil_smoke") |
46 | self:addParticleType("soil_chunks") |
47 | self:addParticleType("soil_big_chunks") |
48 | self:addParticleType("soil_harvesting") |
49 | self:addParticleType("spreader") |
50 | self:addParticleType("spreader_smoke") |
51 | self:addParticleType("windrower") |
52 | self:addParticleType("tedder") |
53 | self:addParticleType("weeder") |
54 | self:addParticleType("crusher_wood") |
55 | self:addParticleType("crusher_dust") |
56 | self:addParticleType("prepare_fruit") |
57 | self:addParticleType("cleaning_soil") |
58 | self:addParticleType("cleaning_dust") |
59 | self:addParticleType("washer_water") |
60 | self:addParticleType("chainsaw_wood") |
61 | self:addParticleType("chainsaw_dust") |
62 | self:addParticleType("pickup") |
63 | self:addParticleType("pickup_falling") |
64 | self:addParticleType("sowing") |
65 | self:addParticleType("loading") |
66 | self:addParticleType("driving_dust") |
67 | self:addParticleType("driving_dry") |
68 | self:addParticleType("driving_wet") |
69 | |
70 | ParticleType = self.nameToIndex |
71 | |
72 | return true |
73 | end |
new
DescriptionCreating managerDefinition
new()Return Values
table | instance | instance of object |
19 | function ParticleSystemManager:new(customMt) |
20 | local self = AbstractManager:new(customMt or ParticleSystemManager_mt) |
21 | |
22 | return self |
23 | end |
unloadMapData
DescriptionUnload data on mission deleteDefinition
unloadMapData()Code
77 | function ParticleSystemManager:unloadMapData() |
78 | for _, fillTypeParticleSystem in pairs(self.particleSystems) do |
79 | for _, ps in pairs(fillTypeParticleSystem) do |
80 | ParticleUtil.deleteParticleSystem(ps); |
81 | end |
82 | end |
83 | |
84 | ParticleSystemManager:superClass().unloadMapData(self) |
85 | end |