Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CombatUnit extends React.Component {
- constructor() {
- super();
- this.state = {
- name: "default",
- speed: 5,
- meleeSkill: 6,
- rangedSkill: 0,
- strength: 10,
- defence: 13,
- armour: 14,
- quantity: 10,
- disabled: false
- };
- this.actions = this.actions.bind(this)
- }
- actions(chosenAction) {
- switch (chosenAction) {
- case "move":
- break;
- case "rangedAttack":
- break;
- case "wait":
- break;
- case "meleeAttack"
- break;
- default: console.log("action not found!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement