Ejemplo n.º 1
0
func Hit()
  {
  if(!GBackLiquid())
    {
    for(var i=15; i>0; i--)
      {
      var iX=Sin(GetR(), RandomX(4,8)), iY=-Cos(GetR(), RandomX(4,8)), iXDir=GetWind()*30/100, iYDir=-Cos(GetR()+RandomX(-2,2), Random(7));
      InsertMaterial(Material("Water"), iX, iY, iXDir, iYDir);
      }
    SetEmpty();
    }
  }
Ejemplo n.º 2
0
func Rain(){
  var vx = GetWind(0, 3) / 10, vy = 150 - Min(GetMaterialVal("WindDrift", "Material", mat), 100)*3/2;
  InsertMaterial(mat, Random(LandscapeWidth()), 0, vx, vy);
  ScheduleCall(this, "Rain", RandomX(5, 10), 0);
}