Difference between revisions of "TTeam.Add"
(new page) |
m (→Example) |
||
Line 9: | Line 9: | ||
Example shown will move all players in Red team to Blue team. | Example shown will move all players in Red team to Blue team. | ||
<syntaxhighlight lang="pascal"> | <syntaxhighlight lang="pascal"> | ||
− | var | + | var |
− | + | p: TPlayer; // not needed, added for clarity | |
− | p: TPlayer; | ||
begin | begin | ||
− | + | while Team[1].Count > 0 do | |
begin | begin | ||
− | p := Team[1].Player[ | + | p := Team[1].Player[0]; |
Team[2].Add(p); | Team[2].Add(p); | ||
end; | end; | ||
Line 21: | Line 20: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | [[Category: | + | [[Category:TTeam]] |
Latest revision as of 13:33, 24 July 2013
procedure Add(Player: TPlayer) Player: a Player that is supposed to be added to the Team
Description
Adds a player to Team's players list.
Changes player's team in game
Example
Example shown will move all players in Red team to Blue team.
var
p: TPlayer; // not needed, added for clarity
begin
while Team[1].Count > 0 do
begin
p := Team[1].Player[0];
Team[2].Add(p);
end;
end;