Add game source, converter pipeline, and web port
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* com.jme3.animation.AnimControl
|
||||
* com.jme3.bullet.control.GhostControl
|
||||
* com.jme3.scene.Spatial
|
||||
*/
|
||||
package mygame;
|
||||
|
||||
import com.jme3.animation.AnimControl;
|
||||
import com.jme3.bullet.control.GhostControl;
|
||||
import com.jme3.scene.Spatial;
|
||||
import mygame.Character;
|
||||
import mygame.Exchange;
|
||||
|
||||
public abstract class Weapon
|
||||
extends Character {
|
||||
GhostControl weaponControl;
|
||||
public Exchange exchange;
|
||||
public boolean skill1 = false;
|
||||
public float cooldown1 = 0.0f;
|
||||
public float cooldown2 = 0.0f;
|
||||
public float cooldown3 = 0.0f;
|
||||
public float COOLDOWN1_TIME = 0.0f;
|
||||
public float COOLDOWN2_TIME = 0.0f;
|
||||
public float COOLDOWN3_TIME = 0.0f;
|
||||
|
||||
public Weapon(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public Weapon(String name, Exchange ex) {
|
||||
super(name);
|
||||
this.exchange = ex;
|
||||
}
|
||||
|
||||
public void setModel(Spatial model) {
|
||||
this.model = model;
|
||||
this.setupModel();
|
||||
this.setupModelControl();
|
||||
this.setupControl();
|
||||
this.wholeBody.attachChild(this.model);
|
||||
}
|
||||
|
||||
protected abstract void setupControl();
|
||||
|
||||
public void setupModelControl() {
|
||||
this.modelAnimControl = (AnimControl)this.model.getControl(AnimControl.class);
|
||||
this.modelAnimChannel = this.modelAnimControl.createChannel();
|
||||
this.modelAnimChannel.setAnim("normal");
|
||||
}
|
||||
|
||||
void setupModel() {
|
||||
this.wholeBody.attachChild(this.model);
|
||||
}
|
||||
|
||||
public void reduceCooldowns(float tpf) {
|
||||
if (this.cooldown1 > 0.0f) {
|
||||
this.cooldown1 -= tpf;
|
||||
}
|
||||
if (this.cooldown2 > 0.0f) {
|
||||
this.cooldown2 -= tpf;
|
||||
}
|
||||
if (this.cooldown3 > 0.0f) {
|
||||
this.cooldown3 -= tpf;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void skill1();
|
||||
|
||||
public abstract void skill2();
|
||||
}
|
||||
Reference in New Issue
Block a user