Changeset 44 for trunk/UEngine.pas


Ignore:
Timestamp:
Apr 19, 2019, 12:02:27 PM (6 years ago)
Author:
chronos
Message:
  • Added: About dialog.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/UEngine.pas

    r43 r44  
    1 unit UCore;
     1unit UEngine;
    22
    33{$mode delphi}{$H+}
     
    427427
    428428procedure TWorld.InitMatter;
     429var
     430  I: Integer;
    429431begin
    430432  // Space
     
    474476  end;
    475477
    476   // Player 1 cannon
    477   with Matters.AddNew do begin
    478     Kind := mkTankBody;
    479     Color := clYellow;
    480     Player := 0;
    481     Blocking := True;
    482   end;
    483   // Player 1 home
    484   with Matters.AddNew do begin
    485     Kind := mkHome;
    486     Color := TColor($00ff00);
    487     Player := 0;
    488     Blocking := True;
    489   end;
    490   // Player 1 body1
    491   with Matters.AddNew do begin
    492     Kind := mkTankBody;
    493     Color := TColor($00ff00);
    494     Player := 0;
    495     Blocking := True;
    496   end;
    497   // Player 1 body2
    498   with Matters.AddNew do begin
    499     Kind := mkTankBody;
    500     Color := TColor($00a000);
    501     Player := 0;
    502     Blocking := True;
    503   end;
    504 
    505   // Player 2 cannon
    506   with Matters.AddNew do begin
    507     Kind := mkTankBody;
    508     Color := clYellow;
    509     Player := 1;
    510     Blocking := True;
    511   end;
    512   // Player 2 home
    513   with Matters.AddNew do begin
    514     Kind := mkHome;
    515     Color :=  TColor($ff2c2c);
    516     Player := 1;
    517     Blocking := True;
    518   end;
    519   // Player 2 body1
    520   with Matters.AddNew do begin
    521     Kind := mkTankBody;
    522     Color := TColor($ff2c2c);
    523     Player := 1;
    524     Blocking := True;
    525   end;
    526   // Player 2 body2
    527   with Matters.AddNew do begin
    528     Kind := mkTankBody;
    529     Color := TColor($b60000);
    530     Player := 1;
    531     Blocking := True;
    532   end;
    533 
    534   // Player 3 cannon
    535   with Matters.AddNew do begin
    536     Kind := mkTankBody;
    537     Color := clYellow;
    538     Player := 2;
    539     Blocking := True;
    540   end;
    541   // Player 3 home
    542   with Matters.AddNew do begin
    543     Kind := mkHome;
    544     Color :=  TColor($0000ff);
    545     Player := 2;
    546     Blocking := True;
    547   end;
    548   // Player 3 body1
    549   with Matters.AddNew do begin
    550     Kind := mkTankBody;
    551     Color := TColor($0000ff);
    552     Player := 2;
    553     Blocking := True;
    554   end;
    555   // Player 3 body2
    556   with Matters.AddNew do begin
    557     Kind := mkTankBody;
    558     Color := TColor($0000a0);
    559     Player := 2;
    560     Blocking := True;
    561   end;
    562 
    563   // Player 4 cannon
    564   with Matters.AddNew do begin
    565     Kind := mkTankBody;
    566     Color := clYellow;
    567     Player := 3;
    568     Blocking := True;
    569   end;
    570   // Player 4 home
    571   with Matters.AddNew do begin
    572     Kind := mkHome;
    573     Color :=  TColor($ff2cff);
    574     Player := 3;
    575     Blocking := True;
    576   end;
    577   // Player 4 body1
    578   with Matters.AddNew do begin
    579     Kind := mkTankBody;
    580     Color := TColor($ff2cff);
    581     Player := 3;
    582     Blocking := True;
    583   end;
    584   // Player 4 body2
    585   with Matters.AddNew do begin
    586     Kind := mkTankBody;
    587     Color := TColor($b600b6);
    588     Player := 3;
    589     Blocking := True;
    590   end;
    591 
    592   // Player 5 cannon
    593   with Matters.AddNew do begin
    594     Kind := mkTankBody;
    595     Color := clYellow;
    596     Player := 4;
    597     Blocking := True;
    598   end;
    599   // Player 5 home
    600   with Matters.AddNew do begin
    601     Kind := mkHome;
    602     Color := TColor($ffff2c);
    603     Player := 4;
    604     Blocking := True;
    605   end;
    606   // Player 5 body1
    607   with Matters.AddNew do begin
    608     Kind := mkTankBody;
    609     Color := TColor($ffff2c);
    610     Player := 4;
    611     Blocking := True;
    612   end;
    613   // Player 5 body2
    614   with Matters.AddNew do begin
    615     Kind := mkTankBody;
    616     Color := TColor($b6b600);
    617     Player := 4;
    618     Blocking := True;
    619   end;
    620 
    621   // Player 6 cannon
    622   with Matters.AddNew do begin
    623     Kind := mkTankBody;
    624     Color := clYellow;
    625     Player := 5;
    626     Blocking := True;
    627   end;
    628   // Player 6 home
    629   with Matters.AddNew do begin
    630     Kind := mkHome;
    631     Color :=  TColor($2cffff);
    632     Player := 5;
    633     Blocking := True;
    634   end;
    635   // Player 6 body1
    636   with Matters.AddNew do begin
    637     Kind := mkTankBody;
    638     Color := TColor($2cffff);
    639     Player := 5;
    640     Blocking := True;
    641   end;
    642   // Player 6 body2
    643   with Matters.AddNew do begin
    644     Kind := mkTankBody;
    645     Color := TColor($00b6b6);
    646     Player := 5;
    647     Blocking := True;
    648   end;
    649 
    650   // Player 7 cannon
    651   with Matters.AddNew do begin
    652     Kind := mkTankBody;
    653     Color := clYellow;
    654     Player := 6;
    655     Blocking := True;
    656   end;
    657   // Player 7 home
    658   with Matters.AddNew do begin
    659     Kind := mkHome;
    660     Color :=  TColor($008cff);
    661     Player := 6;
    662     Blocking := True;
    663   end;
    664   // Player 7 body1
    665   with Matters.AddNew do begin
    666     Kind := mkTankBody;
    667     Color := TColor($008cff);
    668     Player := 6;
    669     Blocking := True;
    670   end;
    671   // Player 7 body2
    672   with Matters.AddNew do begin
    673     Kind := mkTankBody;
    674     Color := TColor($002da0);
    675     Player := 6;
    676     Blocking := True;
    677   end;
    678 
    679   // Player 8 cannon
    680   with Matters.AddNew do begin
    681     Kind := mkTankBody;
    682     Color := clYellow;
    683     Player := 7;
    684     Blocking := True;
    685   end;
    686   // Player 8 home
    687   with Matters.AddNew do begin
    688     Kind := mkHome;
    689     Color :=  TColor($d0d0d0);
    690     Player := 7;
    691     Blocking := True;
    692   end;
    693   // Player 8 body1
    694   with Matters.AddNew do begin
    695     Kind := mkTankBody;
    696     Color := TColor($d0d0d0);
    697     Player := 7;
    698     Blocking := True;
    699   end;
    700   // Player 8 body2
    701   with Matters.AddNew do begin
    702     Kind := mkTankBody;
    703     Color := TColor($707070);
    704     Player := 7;
    705     Blocking := True;
     478  for I := 0 to 7 do begin
     479    // Player cannon
     480    with Matters.AddNew do begin
     481      Kind := mkTankBody;
     482      Player := I;
     483      Blocking := True;
     484    end;
     485    // Player home
     486    with Matters.AddNew do begin
     487      Kind := mkHome;
     488      Player := I;
     489      Blocking := True;
     490    end;
     491    // Player body1
     492    with Matters.AddNew do begin
     493      Kind := mkTankBody;
     494      Player := I;
     495      Blocking := True;
     496    end;
     497    // Player body2
     498    with Matters.AddNew do begin
     499      Kind := mkTankBody;
     500      Player := I;
     501      Blocking := True;
     502    end;
    706503  end;
    707504end;
     
    16651462    Players.Add(NewPlayer);
    16661463    Score := 0;
     1464    World.Matters[Integer(miPlayer1Cannon) + I * 4].Color := clYellow;
    16671465    World.Matters[Integer(miPlayer1Home) + I * 4].Color := Color1;
    16681466    World.Matters[Integer(miPlayer1TankBody) + I * 4].Color := Color1;
Note: See TracChangeset for help on using the changeset viewer.