Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ECE::Game::Clocks()
- {
- duration += _updateClock.restart().asSeconds();
- if (duration >= _updateTime.asSeconds())
- {
- Update();
- duration -= _updateTime.asSeconds();
- }
- }
- void ECE::Game::Update()
- {
- if (SceneManager::GetCurrentScene() != nullptr)
- {
- SceneManager::GetCurrentScene()->Update();
- }
- }
- void ECE::Scene::Update()
- {
- for (std::list<GameObject*>::iterator it = gameObjects.begin(); it != gameObjects.end(); it++)
- {
- it._Ptr->_Myval->Update();
- }
- CollisionChecking();
- }
- void Beam::Update
- {
- //....
- if (hasCreated == false)
- {
- hasCreated = true;
- b = new Beam();
- b->GetCollider().SetPosition(_C_nextPos.GetPosition());
- b->GetCollider().SetRotation(_C_nextPos.GetRotation() + 270);
- b->originPoint = _C_nextPos.GetPosition();
- ECE::SceneManager::GetCurrentScene()->AddGameObject(*b);
- }
- //...
- void ECE::Scene::AddGameObject(GameObject & go)
- {
- gameObjects.insert(gameObjects.end(), &go);
- go.Start();
- }
Add Comment
Please, Sign In to add comment