---------------------------------------------------------------------------------------------------- -- -- All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -- its licensors. -- -- For complete copyright and license terms please see the LICENSE at the root of this -- distribution (the "License"). All use of this software is governed by the License, -- or, if provided, by the license below or the license accompanying this file. Do not -- remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- -- ---------------------------------------------------------------------------------------------------- Rain = { type = "Rain", Properties = { bEnabled = 1, --[0,1,1,"Set this to true/false to turn the rain effect on/off."] bIgnoreVisareas = 0, --[0,1,1,"Continue to render rain when player is inside a visarea."] bDisableOcclusion = 0, --[0,1,1,"Don't check if object should be occluded from rain (is under cover)."] fRadius = 10000.0, --[0,10000,1,"Set the radius, or coverage area, of the rain effect."] fAmount = 1.0, --[0,100,0.1,"Set the overall amount of the rain entity's various effects."] fDiffuseDarkening = 0.5, --[0,1,0.1,"Set the amount of darkening due to wetness that is applied to the surfaces in the world."] fRainDropsAmount = 0.5, --[0,100,0.1,"Set the amount of rain drops that can be seen in the air."] fRainDropsSpeed = 1.0, --[0,100,0.1,"Set the speed at which the rain drops travel."] fRainDropsLighting = 1.0, --[0,100,0.1,"Set the brightness or backlighting of the rain drops."] fPuddlesAmount = 1.5, --[0,10,0.01,"Set the strength (depth and brightness) of puddles generated by the rain."] fPuddlesMaskAmount = 1.0, --[0,1,0.01,"Set the strength of the puddle mask to balance different puddle results."] fPuddlesRippleAmount = 2.0, --[0,100,0.1,"Set the strength and frequency of the puddles generated by the rain (offset PuddlesAmount)."] fSplashesAmount = 1.3, --[0,1000,0.1,"Set the strength of splash effects generated by the rain (subtle ground effect)."] }, Editor = { Icon="shake.bmp", Category="Environment", }, } function Rain:OnInit() self:OnReset(); end function Rain:OnPropertyChange() self:OnReset(); end function Rain:OnReset() end function Rain:OnSave(tbl) tbl.bEnabled = self.Properties.bEnabled; end function Rain:OnLoad(tbl) self.Properties.bEnabled = tbl.bEnabled; end function Rain:OnShutDown() end ---------------------- -- Flow Nodes Start ---------------------- function Rain:Event_Enable( sender ) self.Properties.bEnabled = 1; self:ActivateOutput("Enable", true); end function Rain:Event_Disable( sender ) self.Properties.bEnabled = 0; self:ActivateOutput("Disable", true); end function Rain:Event_Amount( sender, amount ) self.Properties.fAmount = amount; end function Rain:Event_Radius( sender, radius ) self.Properties.fRadius = radius; end function Rain:Event_PuddlesAmount( sender, puddlesamount ) self.Properties.fPuddlesAmount = puddlesamount; end function Rain:Event_RainDropsAmount( sender, raindropsamount ) self.Properties.fRainDropsAmount = raindropsamount; end function Rain:Event_RainDropsSpeed( sender, raindropsspeed ) self.Properties.fRainDropsSpeed = raindropsspeed; end Rain.FlowEvents = { Inputs = { Disable = { Rain.Event_Disable, "bool" }, Enable = { Rain.Event_Enable, "bool" }, Amount = { Rain.Event_Amount, "float" }, Radius = { Rain.Event_Radius, "float" }, PuddlesAmount = { Rain.Event_PuddlesAmount, "float" }, RainDropsAmount = { Rain.Event_RainDropsAmount, "float" }, RainDropsSpeed = { Rain.Event_RainDropsSpeed, "float" }, }, Outputs = { Disable = "bool", Enable = "bool", }, }