-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathModuleSceneTransition.cpp
More file actions
48 lines (35 loc) · 946 Bytes
/
ModuleSceneTransition.cpp
File metadata and controls
48 lines (35 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "Globals.h"
#include "Application.h"
#include "ModuleTextures.h"
#include "ModuleAudio.h"
#include "ModuleInput.h"
#include "ModuleRender.h"
#include "ModuleFadeToBlack.h"
#include "ModuleSceneTransition.h"
// Reference at https://www.youtube.com/watch?v=OEhmUuehGOA
ModuleSceneTransition::ModuleSceneTransition()
{}
ModuleSceneTransition::~ModuleSceneTransition()
{}
// Load assets
bool ModuleSceneTransition::Start()
{
LOG("Loading space intro");
background = App->textures->Load("gunsmoke/map1.png");
App->render->camera.x = App->render->camera.y = 0;
return true;
}
// UnLoad assets
bool ModuleSceneTransition::CleanUp()
{
LOG("Unloading space scene");
App->textures->Unload(background);
return true;
}
// Update: draw background
update_status ModuleSceneTransition::Update()
{
//App->render->Blit(background, 0, 0, NULL);
App->fade->FadeToBlack(this, (Module*)App->scene_space,0.3f);
return UPDATE_CONTINUE;
}