Player::Player () : light("images/light3.sprite"), flashlight("images/flashlightlight.sprite"), flashlighthighlight("images/flashlighthighlight.sprite"), state(STAND) { //laser_pointer = new LaserPointer(); sprite = Sprite3D("models/characters/jane/jane.wsprite"); pos.x = 320; pos.y = 200; name = "player"; jumping = false; energy = MAX_ENERGY; current_ = this; hit_count = 0.0f; sprite.set_action("Stand"); // collision detection init c_object = new CollisionObject(this, Rectf(-15, -120, 15, 0)); c_object->set_pos(pos); c_object->set_velocity(velocity); slot = c_object->sig_collision().connect(this, &Player::collision); Sector::current()->get_collision_engine()->add(c_object); z_pos = 100.0f; contact = 0; weapon = new Pistol(); laser_pointer = ((Pistol*) weapon)->laser_pointer; }
VRDummy::VRDummy(FileReader& props) { props.get("name", name); props.get("pos", pos); props.print_unused_warnings("VRDummy"); sprite = Sprite3D("models/characters/vrdummy/vrdummy.wsprite"); rotation = 0; highlight = Sprite("images/hedgehog_highlight.sprite"); highlight.set_blend_func(GL_SRC_ALPHA, GL_ONE); jump_time = 0; }
VRDummy::VRDummy(const FileReader& props) : sprite(), highlight(), rotation(), jump_time() { props.get("name", name); props.get("pos", pos); sprite = Sprite3D(Pathname("models/characters/vrdummy/vrdummy.wsprite")); rotation = 0; highlight = Sprite(Pathname("images/hedgehog_highlight.sprite")); highlight.set_blend_func(GL_SRC_ALPHA, GL_ONE); jump_time = 0; }
void Draw_Manager::Sprite2D(TexID texID, Vector2f pos, float scale, int align, float rotation) { Sprite3D(texID,Vector3f(pos.x,pos.y,0.0f),scale,align,rotation); }