Adding a UndefineCollision
Posted: Sat Sep 20, 2008 12:51 pm
Can we use:
Collisions.pas Line 312
and modify it to:
to undefine a collision?
In C something like that would generate tons of errors but I don't know what is a TObject and how it is handled by Pascal, so tell me when you have time .
Collisions.pas Line 312
Code: Select all
procedure TCollisionChecks.Add(Cat1, Cat2: integer; Action : TCollisionAction = caCollision);
var
Check : TCollisionCheck;
begin
Check := TCollisionCheck.Create;
Check.Cat1 := Cat1;
Check.Cat2 := Cat2;
Check.Action := Action;
Checks.Add(Check);
ZApp.Models.RegisterCat(Cat1);
ZApp.Models.RegisterCat(Cat2);
end;
Code: Select all
procedure TCollisionChecks.Remove(Cat1, Cat2: integer; Action : TCollisionAction = caCollision);
var
Check : TCollisionCheck;
begin
Check := TCollisionCheck.Create;
Check.Cat1 := Cat1;
Check.Cat2 := Cat2;
Check.Action := Action;
Checks.Remove(Check);
ZApp.Models.RegisterCat(Cat1);
ZApp.Models.RegisterCat(Cat2);
end;
In C something like that would generate tons of errors but I don't know what is a TObject and how it is handled by Pascal, so tell me when you have time .