Guest User

Untitled

a guest
Sep 18th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Attribute(name, index){
  2.   this.name = name;
  3.   this.basevalue = 10;
  4.   this.bonus = 0;
  5.   this.index = index;
  6. };
  7.  
  8. Attribute.prototype = {
  9.   getValue: function () { return this.basevalue + this.bonus; }
  10.   getMod: function () { return parseInt((this.getValue() - 10)/2); }
  11. }
  12.  
  13. <tr ng-repeat="attribute in character.attributes">
  14.   <td>{{attribute.name | uppercase}}
  15.   <td>{{attribute.getValue()}}
  16.   <td>{{attribute.getMod()}}
  17.   <td>{{attribute.basevalue}}
  18.   <td><input type="number" ng-model="attribute.bonus">
  19. </tr>
Advertisement
Add Comment
Please, Sign In to add comment