Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <memory>
- #include <ppgso/ppgso.h>
- #include "object.h"
- #include "scene.h"
- #include "player.h"
- /*!
- * Simple asteroid object
- * This sphere object represents an instance of mesh geometry
- * It initializes and loads all resources only once
- * It will move down along the Y axis and self delete when reaching below -10
- */
- class playerHp final : public Object {
- private:
- // Static resources (Shared between instances)
- static std::unique_ptr<ppgso::Mesh> mesh;
- static std::unique_ptr<ppgso::Shader> shader;
- static std::unique_ptr<ppgso::Texture> texture;
- glm::vec3 rotMomentum;
- Object *parent;
- /*!
- * Split the asteroid into multiple pieces and spawn an explosion object.
- *
- * @param scene - Scene to place pieces and explosion into
- * @param explosionPosition - Initial position of the explosion
- * @param explosionScale - Scale of the explosion
- * @param pieces - Asteroid pieces to generate
- */
- public:
- /*!
- * Create new asteroid
- */
- playerHp(Object *parent);
- /*!
- * Update asteroid
- * @param scene Scene to interact with
- * @param dt Time delta for animation purposes
- * @return
- */
- bool update(Scene &scene, float dt,int offset);
- /*!
- * Render asteroid
- * @param scene Scene to render in
- */
- void render(Scene &scene) override;
- /*!
- * Custom click event for asteroid
- */
- // void generateModelMatrix() override;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement