Changeset 277 for trunk/UUnit.pas
- Timestamp:
- Feb 5, 2019, 11:17:27 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UUnit.pas
r265 r277 19 19 Moves: Integer; 20 20 Cost: Integer; 21 Stack: Integer;21 Power: Integer; 22 22 ViewRange: Integer; 23 procedure Assign(Source: TUnitKind); 23 24 procedure LoadFromNode(Node: TDOMNode); 24 25 procedure SaveToNode(Node: TDOMNode); … … 89 90 { TUnitKind } 90 91 92 procedure TUnitKind.Assign(Source: TUnitKind); 93 begin 94 Id := Source.Id; 95 Name := Source.Name; 96 PowerAttack := Source.PowerAttack; 97 PowerDefense := Source.PowerDefense; 98 Moves := Source.Moves; 99 Cost := Source.Cost; 100 Power := Source.Power; 101 ViewRange := Source.ViewRange; 102 end; 103 91 104 procedure TUnitKind.LoadFromNode(Node: TDOMNode); 92 105 begin 93 106 Id := ReadInteger(Node, 'Id', 0); 94 107 Name := ReadString(Node, 'Name', ''); 95 Stack:= ReadInteger(Node, 'Stack', 0);108 Power := ReadInteger(Node, 'Stack', 0); 96 109 Cost := ReadInteger(Node, 'Cost', 0); 97 110 Moves := ReadInteger(Node, 'Moves', 0); … … 105 118 WriteInteger(Node, 'Id', Id); 106 119 WriteString(Node, 'Name', Name); 107 WriteInteger(Node, 'Stack', Stack);120 WriteInteger(Node, 'Stack', Power); 108 121 WriteInteger(Node, 'Cost', Cost); 109 122 WriteInteger(Node, 'Moves', Moves);
Note:
See TracChangeset
for help on using the changeset viewer.