TreasureHunt: Improve game end check and some map simplifications

install-platforms
Sven Eberhardt 2018-01-10 21:30:15 -08:00
parent 5fc07df757
commit b15a8234b1
4 changed files with 638 additions and 385 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,21 @@
// Goal timer: Barrel has to be brought to the plane
// Doesn't matter if container or not.
#appendto MetalBarrel
func Exit(...)
public func Initialize(...)
{
// dropping at plane? then put into plane
if (Contained() && Contained()->GetAlive())
AddTimer(this.CheckForPlane, 20);
return _inherited(...);
}
private func CheckForPlane()
{
var plane = FindObject(Find_ID(Airplane), Find_AtPoint());
if (plane)
{
var plane = FindObject(Find_ID(Airplane), Find_AtPoint());
if (plane)
{
ScheduleCall(nil, Global.GameCall, 1,1, "OnPlaneLoaded", plane, this);
}
ScheduleCall(nil, Global.GameCall, 1,1, "OnPlaneLoaded", plane, this);
RemoveTimer(this.CheckForPlane);
}
return inherited(...);
}
}