Add new animations. Prepare code for animation implementation.

master
sigonasr2 6 years ago
parent f5e2a711ce
commit 94bc80d9df
  1. BIN
      Archer/Archer_finalrig.ugh
  2. BIN
      SigDN/assets/Models/Archer_finalrig/Archer_finalrig.j3o
  3. 4
      SigDN/assets/Models/Archer_finalrig/Archer_finalrig.j3odata
  4. BIN
      SigDN/assets/Models/Archer_finalrig/Archer_finalrig.mesh.j3o
  5. 3
      SigDN/assets/Models/Archer_finalrig/Archer_finalrig.mesh.j3odata
  6. 32
      SigDN/src/mygame/GenericFunctions.java
  7. 27
      SigDN/src/mygame/Main.java
  8. 60
      SigDN/src/mygame/character/CharacterRig.java
  9. BIN
      archer_skill_siegestance_01_foot.wav
  10. BIN
      archer_skill_siegestance_02_foot.wav
  11. BIN
      archer_skill_siegestance_03_charge.wav
  12. BIN
      archer_skill_siegestance_04_fire.wav
  13. BIN
      archer_skill_spyralvoltex_01_intro.wav
  14. BIN
      dragon nest_bgm_80lv_stage1.ogg
  15. BIN
      dragon nest_bgm_battle_guardian_boss.ogg
  16. BIN
      dragon nest_bgm_field_alteia.ogg
  17. BIN
      dragon nest_bgm_field_anuarendel.ogg
  18. BIN
      player_archer2_skna_01_a.wav
  19. BIN
      player_archer2_skna_01_b.wav
  20. BIN
      player_archer2_skna_34_a.wav
  21. BIN
      player_archer2_sksp_43_k.wav
  22. BIN
      player_archer2_so_13_g.wav
  23. BIN
      player_archer2_social_01_a.wav
  24. BIN
      player_archer2_social_01_b.wav
  25. BIN
      player_archer3_bvh_01_a.ogg
  26. BIN
      player_archer4_sksp01_01.ogg
  27. BIN
      player_archer4_sksp04_03.ogg
  28. BIN
      player_archer_bva_01_a.wav

Binary file not shown.

@ -1,3 +1,3 @@
#
#Thu Jun 13 01:11:59 KST 2019
ORIGINAL_PATH=Models/Archer_finalrig/Archer_finalrig.obj
#Thu Jun 13 01:32:08 KST 2019
ORIGINAL_PATH=Models/Archer_finalrig/Archer_finalrig.mesh.xml

@ -1,3 +0,0 @@
#
#Thu Jun 13 01:32:08 KST 2019
ORIGINAL_PATH=Models/Archer_finalrig/Archer_finalrig.mesh.xml

@ -0,0 +1,32 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mygame;
import com.jme3.asset.AssetManager;
import com.jme3.scene.Spatial;
/**
*
* @author Joshua Sigona
*/
public class GenericFunctions {
/**
* Specify a model name. Returns the entire path.
* @return
*/
public static String ModelName(String name) {
StringBuilder sb = new StringBuilder("Models/")
.append(name)
.append("/")
.append(name)
.append(".j3o");
return sb.toString();
}
public static Spatial LoadModel(AssetManager assetManager, String name) {
return (Spatial)(assetManager.loadModel(ModelName(name)));
}
}

@ -26,7 +26,7 @@ import com.jme3.scene.Node;
* @author normenhansen
*/
public class Main extends SimpleApplication implements
AnimEventListener{
AnimEventListener, ActionListener{
public static Main game;
private AnimChannel channel;
private AnimControl control;
@ -61,7 +61,7 @@ public class Main extends SimpleApplication implements
dl2.setColor(new ColorRGBA(1f, 1f, 1f, 0.5f));
dl2.setDirection(new Vector3f(0.1f, -0.7f, -1).normalizeLocal());
rootNode.addLight(dl2);
Spatial Archer = (Spatial) assetManager.loadModel("Models/Archer_finalrig/Archer_finalrig.mesh.j3o");
Spatial Archer = (Spatial) assetManager.loadModel("Models/Archer_finalrig/Archer_finalrig.j3o");
float scale = 0.05f;
Archer.scale(scale, scale, scale);
@ -97,10 +97,10 @@ public class Main extends SimpleApplication implements
rootNode.attachChild(Archer);
//rootNode.attachChild(bow);
inputManager.addMapping("Swap Weapon",
new KeyTrigger(KeyInput.KEY_SPACE));
inputManager.addMapping("Combat Stance",
new KeyTrigger(KeyInput.KEY_TAB));
ActionListener actionListener = new ActionListener(){
/*ActionListener actionListener = new ActionListener(){
public void onAction(String name, boolean pressed, float tpf){
if (pressed) {
n.detachChild(bow);
@ -117,14 +117,14 @@ public class Main extends SimpleApplication implements
n.attachChild(bow);
}
}
};
};*/
inputManager.addListener(actionListener, "Swap Weapon");
inputManager.addListener(this, "Combat Stance");
}
@Override
public void simpleUpdate(float tpf) {
//TODO: add update code
System.out.println(tpf);
}
@Override
@ -139,4 +139,15 @@ public class Main extends SimpleApplication implements
@Override
public void onAnimChange(AnimControl control, AnimChannel channel, String animName) {
}
@Override
public void onAction(String name, boolean isPressed, float tpf) {
switch (name) {
case "Combat Stance":{
if (isPressed) {
//
}
}break;
}
}
}

@ -0,0 +1,60 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mygame.character;
import com.jme3.animation.AnimChannel;
import com.jme3.animation.AnimControl;
import com.jme3.animation.SkeletonControl;
import com.jme3.scene.Node;
import com.jme3.scene.Spatial;
import mygame.GenericFunctions;
import mygame.Main;
/**
*
* @author Joshua Sigona
*/
public class CharacterRig extends Main{
Spatial character;
String[] topbones; //Controlled only by top motion. Anything not specified here is bottom control.
AnimChannel top_channel,bot_channel;
AnimControl control;
SkeletonControl skeleton;
Node primary_hand,secondary_hand,torso;
Spatial weapon;
boolean combat_stance=false;
//Combat stance
CharacterRig(String model,String... topbones) {
this.character = GenericFunctions.LoadModel(assetManager,model);
this.topbones = topbones;
control = character.getControl(AnimControl.class);
control.addListener(Main.game);
bot_channel = control.createChannel();
top_channel = control.createChannel();
SkeletonControl skeleton = character.getControl(SkeletonControl.class);
primary_hand = skeleton.getAttachmentsNode("Left Wrist");
secondary_hand = skeleton.getAttachmentsNode("Right Wrist");
torso = skeleton.getAttachmentsNode("Torso");
}
public void setWeapon(Spatial weapon) {
this.weapon=weapon;
}
public void update(float tpf) {
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save