Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- ConveyorBeltEffect
- CutterEffect
- Effect
- EffectManager
- LevelerEffect
- MorphPositionEffect
- ParticleEffect
- PipeEffect
- ShaderPlaneEffect
- SlurrySideToSideEffect
- TipEffect
- WindrowerEffect
- 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
SlurrySideToSideEffect
DescriptionCopyright (C) GIANTS Software GmbH, Confidential, All Rights Reserved.Parent
ShaderPlaneEffectFunctions
isRunning
DescriptionDefinitionisRunning()Code
44 | function SlurrySideToSideEffect:isRunning() |
45 | return SlurrySideToSideEffect:superClass().isRunning(self) or self.state == ShaderPlaneEffect.STATE_ON |
46 | end |
loadEffectAttributes
DescriptionDefinitionloadEffectAttributes()Code
22 | function SlurrySideToSideEffect:loadEffectAttributes(xmlFile, key, node, i3dNode, i3dMapping) |
23 | if not SlurrySideToSideEffect:superClass().loadEffectAttributes(self, xmlFile, key, node, i3dNode, i3dMapping) then |
24 | return false |
25 | end |
26 | |
27 | self.refAnimation = Effect.getValue(xmlFile, key, getXMLString, node, "refAnimation") |
28 | self.offset = Utils.getNoNil(Effect.getValue(xmlFile, key, getXMLFloat, node, "offset"), 0.5) |
29 | |
30 | return true |
31 | end |
new
DescriptionDefinitionnew()Code
10 | function SlurrySideToSideEffect:new(customMt) |
11 | if customMt == nil then |
12 | customMt = SlurrySideToSideEffect_mt |
13 | end |
14 | |
15 | local self = ShaderPlaneEffect:new(customMt) |
16 | |
17 | return self |
18 | end |
update
DescriptionDefinitionupdate()Code
35 | function SlurrySideToSideEffect:update(dt) |
36 | SlurrySideToSideEffect:superClass().update(self, dt) |
37 | |
38 | local z = (self.parent:getAnimationTime(self.refAnimation) + self.offset) % 1 |
39 | setShaderParameter(self.node, "fadeProgress", self.fadeCur[1], self.fadeCur[2], z, 0, false) |
40 | end |