1
2
3
4
5
6
7
8
9 package cz.cuni.amis.pogamut.defcon.communication.messages.commands;
10
11 import cz.cuni.amis.pogamut.base.communication.messages.*;
12 import cz.cuni.amis.pogamut.base.communication.worldview.*;
13 import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
14 import cz.cuni.amis.pogamut.defcon.base3d.worldview.object.DefConLocation;
15 import cz.cuni.amis.pogamut.defcon.communication.messages.*;
16 import cz.cuni.amis.pogamut.defcon.communication.messages.commands.*;
17 import cz.cuni.amis.pogamut.defcon.communication.messages.infos.*;
18 import cz.cuni.amis.pogamut.defcon.consts.*;
19 import cz.cuni.amis.pogamut.defcon.consts.state.*;
20 import cz.cuni.amis.utils.exception.*;
21
22 import java.util.*;
23
24 import javabot.*;
25
26
27
28
29
30 public class SetLandingTarget extends DefConCommand {
31
32
33
34 private int unitId = 0;
35
36
37
38
39 private int targetUnitId = 0;
40
41
42
43
44
45
46
47
48
49
50
51 public SetLandingTarget(int unitId, int targetUnitId) {
52 this.unitId = unitId;
53
54 this.targetUnitId = targetUnitId;
55 }
56
57
58
59
60
61 public SetLandingTarget(SetLandingTarget original) {
62 this.unitId = original.unitId;
63
64 this.targetUnitId = original.targetUnitId;
65 }
66
67
68
69
70
71
72 public int getUnitId() {
73 return this.unitId;
74 }
75
76
77
78
79
80
81
82
83 public SetLandingTarget setUnitId(int unitId) {
84 this.unitId = unitId;
85
86 return this;
87 }
88
89
90
91
92
93
94 public int getTargetUnitId() {
95 return this.targetUnitId;
96 }
97
98
99
100
101
102
103
104
105 public SetLandingTarget setTargetUnitId(int targetUnitId) {
106 this.targetUnitId = targetUnitId;
107
108 return this;
109 }
110
111
112
113
114 @Override
115 public void perform() {
116 JBot.SetLandingTarget(getUnitId(), getTargetUnitId());
117 }
118
119
120
121
122
123
124 @Override
125 public String toString() {
126 return "SetLandingTarget[" + getStringizedFields() + "; UnitId = " + this.unitId +
127 "; TargetUnitId = " + this.targetUnitId + "]";
128 }
129
130
131
132
133
134
135 public String toHtmlString() {
136 return "<p><b>SetLandingTarget:</b></p>" + "<p><i>UnitId:</i> " + this.unitId + "</p>" +
137 "<p><i>TargetUnitId:</i> " + this.targetUnitId + "</p>";
138 }
139 }