Publishing a working version :-)

This commit is contained in:
FlightControl
2016-06-06 13:43:32 +02:00
parent 8777f516af
commit e82ba13b8b
80 changed files with 2137 additions and 35256 deletions

View File

@@ -0,0 +1,19 @@
Include.File( "Zone" )
Include.File( "Group" )
Include.File( "Scheduler" )
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
local ZoneA = ZONE:New( "Zone A" ):SmokeZone( POINT_VEC3.SmokeColor.White, 90 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@@ -8,20 +8,14 @@ local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
local GroupPolygon = GROUP:FindByName( "Polygon A" )
local PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon )
local function Message()
end
local PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ):SmokeZone( POINT_VEC3.SmokeColor.White, 20 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 0.5 )
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 )
if GroupInside:IsCompletelyInZone( PolygonZone ) then
GroupInside:GetUnit(1):SmokeWhite()
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 0.5 )
{}, 0, 1 )

View File

@@ -0,0 +1,20 @@
Include.File( "Zone" )
Include.File( "Group" )
Include.File( "Scheduler" )
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
local House = STATIC:FindByName( "House" )
local ZoneA = ZONE_RADIUS:New( "Zone A", House:GetPointVec2(), 300 ):SmokeZone( POINT_VEC3.SmokeColor.White, 90 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@@ -0,0 +1,25 @@
Include.File( "Zone" )
Include.File( "Group" )
Include.File( "Scheduler" )
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
local Tank = UNIT:FindByName( "Tank" )
local ZoneA = ZONE_UNIT:New( "Zone A", Tank, 100 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )
TankZoneColoring = SCHEDULER:New( nil,
function()
ZoneA:FlareZone( POINT_VEC3.FlareColor.White, 90, 60 )
end,
{}, 0, 5 )