Loading app/src/main/java/com/example/a8_bitinvader/Enemy.java 0 → 100644 +26 −0 Original line number Original line Diff line number Diff line package com.example.a8_bitinvader; public class Enemy extends Sprite{ int XVal,YVal; //initialize the Xval,Yval. and inital position public Enemy(int PosX, int PosY, int theXVal, int theYVal, int img ) { super(PosX,PosY,img); XVal = theXVal; YVal = theYVal; } //this updates the location of the sprite @Override public void updateLocation(){ x += XVal; y += YVal; } @Override public void destroy() { //call the distroy functions, then delete this. } } Loading
app/src/main/java/com/example/a8_bitinvader/Enemy.java 0 → 100644 +26 −0 Original line number Original line Diff line number Diff line package com.example.a8_bitinvader; public class Enemy extends Sprite{ int XVal,YVal; //initialize the Xval,Yval. and inital position public Enemy(int PosX, int PosY, int theXVal, int theYVal, int img ) { super(PosX,PosY,img); XVal = theXVal; YVal = theYVal; } //this updates the location of the sprite @Override public void updateLocation(){ x += XVal; y += YVal; } @Override public void destroy() { //call the distroy functions, then delete this. } }