Changeset 24 for trunk/UCore.pas
- Timestamp:
- Sep 28, 2011, 9:14:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r23 r24 204 204 (X: 0; Y: 1), (X: -1; Y: 1), (X: -1; Y: 0), (X: -1; Y: -1)); 205 205 206 var207 Engine: TEngine;208 209 206 function SwapBRComponent(Value: Integer): Integer; inline; 210 207 … … 427 424 Color := TColor($b600b6); 428 425 Player := 3; 426 end; 427 428 // Player 5 cannon 429 with TMatter(Matter.AddNew(TMatter.Create)) do begin 430 Kind := mkCannon; 431 Color := clYellow; 432 Player := 4; 433 end; 434 // Player 5 home 435 with TMatter(Matter.AddNew(TMatter.Create)) do begin 436 Kind := mkHome; 437 Color := TColor($ffff2c); 438 Player := 4; 439 end; 440 // Player 5 body1 441 with TMatter(Matter.AddNew(TMatter.Create)) do begin 442 Kind := mkTankBody; 443 Color := TColor($ffff2c); 444 Player := 4; 445 end; 446 // Player 5 body2 447 with TMatter(Matter.AddNew(TMatter.Create)) do begin 448 Kind := mkTankBody; 449 Color := TColor($b6b600); 450 Player := 4; 451 end; 452 453 // Player 6 cannon 454 with TMatter(Matter.AddNew(TMatter.Create)) do begin 455 Kind := mkCannon; 456 Color := clYellow; 457 Player := 5; 458 end; 459 // Player 6 home 460 with TMatter(Matter.AddNew(TMatter.Create)) do begin 461 Kind := mkHome; 462 Color := TColor($2cffff); 463 Player := 5; 464 end; 465 // Player 6 body1 466 with TMatter(Matter.AddNew(TMatter.Create)) do begin 467 Kind := mkTankBody; 468 Color := TColor($2cffff); 469 Player := 5; 470 end; 471 // Player 6 body2 472 with TMatter(Matter.AddNew(TMatter.Create)) do begin 473 Kind := mkTankBody; 474 Color := TColor($00b6b6); 475 Player := 5; 476 end; 477 478 // Player 7 cannon 479 with TMatter(Matter.AddNew(TMatter.Create)) do begin 480 Kind := mkCannon; 481 Color := clYellow; 482 Player := 6; 483 end; 484 // Player 7 home 485 with TMatter(Matter.AddNew(TMatter.Create)) do begin 486 Kind := mkHome; 487 Color := TColor($008cff); 488 Player := 6; 489 end; 490 // Player 7 body1 491 with TMatter(Matter.AddNew(TMatter.Create)) do begin 492 Kind := mkTankBody; 493 Color := TColor($008cff); 494 Player := 6; 495 end; 496 // Player 7 body2 497 with TMatter(Matter.AddNew(TMatter.Create)) do begin 498 Kind := mkTankBody; 499 Color := TColor($002da0); 500 Player := 6; 501 end; 502 503 // Player 8 cannon 504 with TMatter(Matter.AddNew(TMatter.Create)) do begin 505 Kind := mkCannon; 506 Color := clYellow; 507 Player := 7; 508 end; 509 // Player 8 home 510 with TMatter(Matter.AddNew(TMatter.Create)) do begin 511 Kind := mkHome; 512 Color := TColor($d0d0d0); 513 Player := 7; 514 end; 515 // Player 8 body1 516 with TMatter(Matter.AddNew(TMatter.Create)) do begin 517 Kind := mkTankBody; 518 Color := TColor($d0d0d0); 519 Player := 7; 520 end; 521 // Player 8 body2 522 with TMatter(Matter.AddNew(TMatter.Create)) do begin 523 Kind := mkTankBody; 524 Color := TColor($707070); 525 Player := 7; 429 526 end; 430 527 end; … … 666 763 for P := 0 to Engine.Players.Count - 1 do 667 764 with TPlayer(Engine.Players[P]) do 668 if Enabled and (TMatter(Engine.World.Matter[ItemsXY[Pos.X, Pos.Y]]).Kind = mkTankBody) then 765 if (TMatter(Engine.World.Matter[ItemsXY[Pos.X, Pos.Y]]).Kind = mkTankBody) and 766 (TMatter(Engine.World.Matter[ItemsXY[Pos.X, Pos.Y]]).Player = P) then 669 767 Shield := Shield - 1 / ShieldSteps; 670 768 if StopByDirt then Explosion(LastPos, BulletExplosionRange); … … 1111 1209 with TPlayer(PlayerPool.AddNew(TPlayer.Create)) do begin 1112 1210 Keys.Left := 76; 1113 Keys.Down := 1 86;1211 Keys.Down := 147; 1114 1212 Keys.Right := 222; 1115 1213 Keys.Up := 80; … … 1123 1221 Keys.Shoot := 105; 1124 1222 end; 1223 with TPlayer(PlayerPool.AddNew(TPlayer.Create)) do begin 1224 Keys.Left := 0; 1225 Keys.Down := 0; 1226 Keys.Right := 0; 1227 Keys.Up := 0; 1228 Keys.Shoot := 0; 1229 end; 1230 with TPlayer(PlayerPool.AddNew(TPlayer.Create)) do begin 1231 Keys.Left := 0; 1232 Keys.Down := 0; 1233 Keys.Right := 0; 1234 Keys.Up := 0; 1235 Keys.Shoot := 0; 1236 end; 1237 with TPlayer(PlayerPool.AddNew(TPlayer.Create)) do begin 1238 Keys.Left := 0; 1239 Keys.Down := 0; 1240 Keys.Right := 0; 1241 Keys.Up := 0; 1242 Keys.Shoot := 0; 1243 end; 1244 with TPlayer(PlayerPool.AddNew(TPlayer.Create)) do begin 1245 Keys.Left := 0; 1246 Keys.Down := 0; 1247 Keys.Right := 0; 1248 Keys.Up := 0; 1249 Keys.Shoot := 0; 1250 end; 1125 1251 for I := 0 to PlayerPool.Count - 1 do 1126 1252 with TPlayer(PlayerPool[I]) do begin … … 1129 1255 InitTanks; 1130 1256 Name := SPlayer + ' ' + IntToStr(I + 1); 1257 Enabled := True; 1131 1258 end; 1132 1259 end; … … 1230 1357 I2: Integer; 1231 1358 begin 1359 Active := False; 1232 1360 Players.Clear; 1233 1361 for I := 0 to PlayerPool.Count - 1 do … … 1242 1370 with TPlayer(Players[I]) do 1243 1371 Init; 1372 ClearBackground := True; 1244 1373 Redraw; 1374 Active := True; 1245 1375 end; 1246 1376
Note:
See TracChangeset
for help on using the changeset viewer.