java - creating an instance of my character -


i have silly little issue can't wrap mind around, simple can't figure out , can't find how it, have been reading libgdx tutorials while now, using different parts everywhere create own side scrolling game.

i have class:

package com.gibbo.bounce.model;  import com.badlogic.gdx.math.rectangle; import com.badlogic.gdx.math.vector2;  public class gib {       public static final float speed = 5f;     public static final float bounce_height = 8f;     public static final float gib_height = 4f;     public static final float gib_width = 1.5f;      vector2 position = new vector2();     vector2 acceleration = new vector2();     vector2 velocity = new vector2();     rectangle bounds = new rectangle();      public gib(vector2 position){         this.position = position;         this.bounds.height = gib_height;         this.bounds.width = gib_width;     }      public vector2 getposition(){         return position;     }      public vector2 getacceleration(){         return acceleration;     }      public vector2 getvelocity(){         return velocity;     }      public rectangle getbounds(){         return bounds;     }   } 

so player character, need import him , render him literally have no idea how, funny thing is.... can type code render rectangle in game screen class complete accel movement , side collisions have no idea how take class , use properties that...fail.

someone got idea, presume straight forward lol.

edit: have tried using constructor gib gib = new gib(); no avail, throws errors, lack of constructor? have missed here :s

there no 0-argument constructor class gib. need either create 0 argument constructor public class gib(){} or call constructor vector2 parameter created.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -