Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
217CR-Deferral-Assignment-Basic-Project/Sphere.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26 lines (22 sloc)
892 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "GameObject.h" | |
//A basic sphere class derived from a game object | |
//It can move (basic position changing only at the moment!) via the arrow keys | |
class Sphere : public GameObject | |
{ | |
public: | |
// -- variables -- | |
float radius; | |
float moveSpeed; | |
// -- constructors/destructors -- | |
Sphere(); //default constructor - aka no values passed in (position at 0,0,0 - colour magenta - radius 1 - move speed - 1) | |
Sphere(float _x, float _y, float _z, float _radius, float _moveSpeed); //pass in a position, radius and movespeed | |
Sphere(float _x, float _y, float _z, | |
float _r, float _g, float _b, | |
float _radius, float _moveSpeed); //pass in a position, colour, radius and move speed | |
~Sphere() {}; //default destructor | |
// -- functions -- | |
//Need to give definions to GameObject's pure virtual functions | |
virtual void Draw(); | |
virtual void Update(float deltaTime); | |
}; |