Last change
on this file since 8e945fc was 8edd04e, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 5 years ago |
Make the decompiled game code compile successfully
|
-
Property mode
set to
100644
|
File size:
718 bytes
|
Rev | Line | |
---|
[8edd04e] | 1 | package main;
|
---|
| 2 |
|
---|
| 3 | public class ProjectileSpeed extends Effect {
|
---|
| 4 |
|
---|
| 5 | private int speedChange;
|
---|
| 6 |
|
---|
| 7 | public ProjectileSpeed(int speedChange, TargetType target) {
|
---|
| 8 | super(EffectType.ProjectileSpeed, target);
|
---|
| 9 | this.speedChange = speedChange;
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | public ProjectileSpeed(ProjectileSpeed e) {
|
---|
| 13 | super(e);
|
---|
| 14 | this.speedChange = e.speedChange;
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | public ProjectileSpeed copy() {
|
---|
| 18 | return new ProjectileSpeed(this);
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | public double getSpeedChange() {
|
---|
| 22 | return this.speedChange;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | public void applyEffect(Object o) {
|
---|
| 26 | Projectile proj = (Projectile)o;
|
---|
| 27 | proj.setSpeed(proj.getSpeed() + this.speedChange);
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | public String toString() {
|
---|
| 31 | return Double.toString(this.speedChange);
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.