示例#1
0
        public PointObject(int id)
        {
            //this.id = id;

            setId();
            currentstate              = new PhysicalState();
            desiredstate              = new PhysicalState();
            x_force                   = 0;
            y_force                   = 0;
            currentstate.x_position   = 200;
            currentstate.y_position   = 400;
            this.type                 = "point";
            this.life                 = 1;
            this.collisioncoefficient = 1;
        }
示例#2
0
        public MobObject(float x, float y)
        {
            setId();

            currentstate = new PhysicalState();
            desiredstate = new PhysicalState();
            x_force      = 0;
            y_force      = 0;


            currentstate.x_position = x;
            currentstate.y_position = y;
            currentstate.x_velocity = 16;

            this.type = "mob";
            this.life = 2;

            this.halfheight = 11.5f;
            this.halfwidth  = 8;


            this.collisioncoefficient = 1;
        }
示例#3
0
        public PlayerObject(PlayerController p)
        {
            setId();

            currentstate = new PhysicalState();
            desiredstate = new PhysicalState();
            x_force      = 0;
            y_force      = 0;


            currentstate.x_position = 200;
            currentstate.y_position = 400;
            this.playerInput        = p;
            this.type       = "player";
            this.life       = 30;
            this.invul      = false;
            this.invultimer = 0;

            this.halfheight = 16;
            this.halfwidth  = 8;

            //this.jumpcounter = 0;
            this.collisioncoefficient = 0;
        }
示例#4
0
 public UpdatePacket(int id, PhysicalState state)
 {
     this.id    = id;
     this.state = state;
 }