jeszcze jedno: :zdegustowany:
czy kto艣 wie dlaczego nie chce mi si臋 wyswietli膰 Text Sprite? :<
Dziwne bo normalne Sprite'y dzia艂aj膮 bez problemu :mad:
package com.Piotrek.zuzel;
import android.view.MotionEvent;
//import com.rokonexamples.sprite.Textures;
import com.stickycoding.rokon.Scene;
import com.stickycoding.rokon.Sprite;
import com.stickycoding.rokon.TextSprite;
import android.util.Log;
public class ScenaGry extends Scene {
//private FixedBackground tlo;
int czystrzelac;
private Sprite tor;
private Sprite zaw;
private TextSprite moj_tekst;
//private static final String TAG = "MyActivity" ;
public ScenaGry(){
super(1, 3);
moj_tekst = new TextSprite(290, 450, 60, 60);
moj_tekst.setText("blablabla");
//moj_tekst.getText(123455);
zaw = new Sprite(100, 50, Tekstury.zaw.getWidth(), Tekstury.zaw.getHeight());
zaw.setTexture(Tekstury.zaw);
tor = new Sprite(-400, -300, Tekstury.tor.getWidth(), Tekstury.tor.getHeight());
tor.setTexture(Tekstury.tor);
//Log.i(TAG,"Czy wyswietlisz cos?");
add(0, zaw);
add(0, tor);
add(0, moj_tekst);
}
@Override
public void onGameLoop() {
}
@Override
public void onTouchDown(float x, float y, MotionEvent event, int pointerCount, int pointerId)
{
}
@Override
public void onTouchMove(float x, float y, MotionEvent event, int pointerCount, int pointerId)
{
// This is called when you move your finger over the screen. (ie pretty much every frame if your holding your finger down)
// Here we'll basically just make Bob follow your finger.
zaw.x = x - (Tekstury.zaw.getWidth()/2);
zaw.y = y - (Tekstury.zaw.getHeight()/2);
//moj_tekst.x = x - (300/2);
//moj_tekst.y = y - (470/2);
}
@Override
public void onTouchUp(float x, float y, MotionEvent event, int pointerCount, int pointerId)
{
}
@Override
public void onPause() {
}
@Override
public void onResume() {
}
@Override
public void onReady() {
}
}
prosz臋 o szybk膮 odpowied藕!
Stawiam :piwo:馃槈