super.read(im); InputCapsule ic = im.getCapsule(this); String[] loadedBoneList = ic.readStringArray("boneList", new String[0]);
super.read(im); InputCapsule ic = im.getCapsule(this); String[] loadedBoneList = ic.readStringArray("boneList", new String[0]);
/** * De-serialize this control, for example when loading from a J3O file. * * @param im importer (not null) * @throws IOException from importer */ @Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule in = im.getCapsule(this); this.radius = in.readFloat("radius", 1); this.height = in.readFloat("height", 2); this.mass = in.readFloat("mass", 80); this.physicsDamping = in.readFloat("physicsDamping", 0.9f); this.jumpForce.set((Vector3f) in.readSavable("jumpForce", new Vector3f(0, mass * 5, 0))); rigidBody = new PhysicsRigidBody(getShape(), mass); jumpForce.set(new Vector3f(0, mass * 5, 0)); rigidBody.setAngularFactor(0); } }
/** * De-serialize this control, for example when loading from a J3O file. * * @param im importer (not null) * @throws IOException from importer */ @Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule in = im.getCapsule(this); this.radius = in.readFloat("radius", 1); this.height = in.readFloat("height", 2); this.mass = in.readFloat("mass", 80); this.physicsDamping = in.readFloat("physicsDamping", 0.9f); this.jumpForce.set((Vector3f) in.readSavable("jumpForce", new Vector3f(0, mass * 5, 0))); rigidBody = new PhysicsRigidBody(getShape(), mass); jumpForce.set(new Vector3f(0, mass * 5, 0)); rigidBody.setAngularFactor(0); } }
super.read(im); InputCapsule ic = im.getCapsule(this); String[] loadedBoneList = ic.readStringArray("boneList", new String[0]);
super.read(im); InputCapsule ic = im.getCapsule(this); String[] loadedBoneList = ic.readStringArray("boneList", new String[0]);
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule in = im.getCapsule(this); this.radius = in.readFloat("radius", 1); this.height = in.readFloat("height", 2); this.mass = in.readFloat("mass", 80); this.physicsDamping = in.readFloat("physicsDamping", 0.9f); this.jumpForce.set((Vector3f) in.readSavable("jumpForce", new Vector3f(0, mass * 5, 0))); rigidBody = new PhysicsRigidBody(getShape(), mass); jumpForce.set(new Vector3f(0, mass * 5, 0)); rigidBody.setAngularFactor(0); } }
/** * De-serialize this control, for example when loading from a J3O file. * * @param im importer (not null) * @throws IOException from importer */ @Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule in = im.getCapsule(this); this.radius = in.readFloat("radius", 1); this.height = in.readFloat("height", 2); this.mass = in.readFloat("mass", 80); this.physicsDamping = in.readFloat("physicsDamping", 0.9f); this.jumpForce.set((Vector3f) in.readSavable("jumpForce", new Vector3f(0, mass * 5, 0))); rigidBody = new PhysicsRigidBody(getShape(), mass); jumpForce.set(new Vector3f(0, mass * 5, 0)); rigidBody.setAngularFactor(0); } }