Using SimpleObject Class

From TRCCompSci - AQA Computer Science
Revision as of 09:33, 13 June 2019 by Admin (talk | contribs)
Jump to: navigation, search

Now we have a class for a simple object (SimpleObj) we can use it. This will create a class for your game, and it will create objects of the SimpleObj class.

Game.h

Remember a class in C++ needs a header to declare the variables and to specify the methods it contains. Remember it provides no implementation for the methods:

#pragma once

class Game
{
public:
	Game(); //standard constructor
	~Game(); //standard destructor

		//list the functions we want to have (called methods in C++)	
	void Update();
};