Added some structuring.
The game runs but only a black window is shown.
This commit is contained in:
parent
f132916a0f
commit
d0893cba3a
16 changed files with 296 additions and 88 deletions
25
src/moversine.cpp
Normal file
25
src/moversine.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "moversine.hpp"
|
||||
#include <cmath>
|
||||
|
||||
namespace cloonel {
|
||||
///--------------------------------------------------------------------------
|
||||
///--------------------------------------------------------------------------
|
||||
MoverSine::MoverSine() :
|
||||
MoverOneShot(),
|
||||
m_alpha(0.0f),
|
||||
m_power(1.0f)
|
||||
{
|
||||
}
|
||||
|
||||
///--------------------------------------------------------------------------
|
||||
///--------------------------------------------------------------------------
|
||||
float2 MoverSine::GetOffset() const {
|
||||
return float2(std::sin(m_alpha) * m_power);
|
||||
}
|
||||
|
||||
///--------------------------------------------------------------------------
|
||||
///--------------------------------------------------------------------------
|
||||
void MoverSine::Update (float parDelta) {
|
||||
m_alpha += parDelta;
|
||||
}
|
||||
} //namespace cloonel
|
Loading…
Add table
Add a link
Reference in a new issue