Space Fighter
A "shmup" game for Computer Programming C++
Loading...
Searching...
No Matches
GameTime.h
Go to the documentation of this file.
1
2/*
3 ██╗ ██╗ █████╗ ████████╗ █████╗ ███╗ ██╗ █████╗
4 ██║ ██╔╝ ██╔══██╗ ╚══██╔══╝ ██╔══██╗ ████╗ ██║ ██╔══██╗
5 █████╔╝ ███████║ ██║ ███████║ ██╔██╗ ██║ ███████║
6 ██╔═██╗ ██╔══██║ ██║ ██╔══██║ ██║╚██╗██║ ██╔══██║
7 ██║ ██╗ ██║ ██║ ██║ ██║ ██║ ██║ ╚████║ ██║ ██║
8 ╚═╝ ╚═╝ ╚═╝ ╚═╝/\ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝
9 /vvvvvvvvvvvvvvvvvvv \=========================================,
10 `^^^^^^^^^^^^^^^^^^^ /---------------------------------------"
11 Katana Engine \/ © 2012 - Shuriken Studios LLC
12 http://www.shurikenstudios.com
13*/
14
15#pragma once
16
17namespace KatanaEngine
18{
21 {
22 friend class Game;
23
24 public:
25
26 GameTime();
27
30 double GetElapsedTime() const { return m_elapsedTime; }
31
34 double GetTotalTime() const { return m_currentTotalTime; }
35
36
37
38 private:
39
40 void Update();
41
42 double m_currentTotalTime;
43 double m_previousTotalTime;
44 double m_elapsedTime;
45 };
46}
Base class for all games. Provides graphics initialization, game loop, and rendering code....
Definition Game.h:22
Contains timing values for game updates and rendering.
Definition GameTime.h:21
double GetElapsedTime() const
Gets the time in seconds since last frame.
Definition GameTime.h:30
double GetTotalTime() const
Gets the time in seconds since the game started.
Definition GameTime.h:34
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...
Definition Animation.cpp:18