Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.52 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5.  
  6. package com.vza.director.model;
  7.  
  8. import com.jme3.animation.AnimChannel;
  9. import com.jme3.scene.Spatial;
  10. import java.util.ArrayList;
  11.  
  12. /**
  13.  *
  14.  * @author Kyle Williams
  15.  */
  16. public final class AttackKey {
  17.     ArrayList<String> button = new ArrayList<String>();
  18.     private String animation,prevAni;
  19.     private boolean isLast,isBlock,isBlockBreaker;
  20.     public AttackKey(ArrayList<String> button, String animation){
  21.         this.button=button;
  22.         this.animation=animation;
  23.         this.prevAni="";
  24.         this.isLast=false;
  25.         this.isBlock=false;
  26.         this.isBlockBreaker=false;
  27.     }
  28.  
  29.     /**
  30.      * Returns the button/s needed to perform this move
  31.      * @return An Array of Buttons Required to perform the Animation
  32.      */
  33.     public final ArrayList<String> getButton(){return button;}
  34.  
  35.     /**
  36.      * Returns the name of the attack
  37.      * @return aniamtion
  38.      */
  39.     public final String getAnimationName(){return animation;}
  40.  
  41.     /**
  42.      * Returns if this is the last attack in a combo
  43.      * @return isLast
  44.      */
  45.     public final boolean getisLast(){return isLast;}
  46.  
  47.     /**
  48.      * Returns if this is the last attack in a combo
  49.      * @return isLast
  50.      */
  51.     public final boolean getisBlock(){return isBlock;}
  52.  
  53.     /**
  54.      * Returns if this is the last attack in a combo
  55.      * @return isLast
  56.      */
  57.     public final boolean getisBlockBreaker(){return isBlockBreaker;}
  58.  
  59.     /**
  60.      * Performs This attack
  61.      * @param model
  62.      * @param control
  63.      */
  64.     public void performKey(Spatial model, AnimChannel control){
  65.         control.setAnim(animation,0);
  66.     }
  67.     /**
  68.      * ONLY USE THIS KEY MARKS THE END OF A COMBOSET
  69.      * this is used to set the isLast boolean to true
  70.      */
  71.     public final void setIsLast(){isLast = true;}
  72.      /**
  73.      * this is used to set the block boolean to true
  74.      */
  75.     public final void setBlock(){isBlock=true;}
  76.      /**
  77.      * this is used to set the blockBreaker boolean to true
  78.      */
  79.     public final void setBlockBreaker(){isBlockBreaker=true;}
  80.     /**
  81.      * The sequence Control is the attack key animation that is called right before this one
  82.      * @param seqCont
  83.      */
  84.     //TODO: PrevAnimation or PrevButton hmmm
  85.     public final void setPrevAni(String prev){this.prevAni=prev;}
  86.     /**
  87.      * Gets the key that is used right before this one
  88.      */
  89.     public final String getPrevAni(){return prevAni;}
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement