Skip to content

Commit 518e2a0

Browse files
committed
Assignment1.2
1 parent 9ace7ff commit 518e2a0

7 files changed

Lines changed: 19 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## [Assignment1.2] - 26/10/2019
4+
### Added
5+
- Can deselect GameObjects clicking in hierarchy window
6+
- All panels can be access in Windows menu bar
7+
- Brofiler
8+
9+
### Fixed
10+
- Dt code
11+
- Can Focus on an object without need to move mouse to scene panel
12+
- #11
13+
- Drag and drop of pictures (png and jpg)
14+
315
## [Assignment1.1] - 26/10/2019
416
### Added
517
- Drag and Drop GameObjects in hierarchy

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 3D Game Engine: WhispEngine
22

33
## Current Version
4-
v Assignment1.1
4+
v Assignment1.2
55

66
## Description
77
This is a 3D Game Engine made by Students at CITM (UPC) from Spain.
@@ -44,9 +44,9 @@ Extract .zip files inside a folder and open the .exe file.
4444
* Shortcut system
4545
* Drag and Drop Game objects inside/outside other objects to transform parents and children
4646
* Create an empty Game object with right click in hierarchy and delete it
47-
* Transform logic created and working! (but commented PushMatrix in code at the request of the teacher)
47+
* Transform logic created and working! (commented in code for assignment1)
4848
* Add component
49-
* Outline meshes using StencilBuffer (blue to children objs, yellow to parent objs)
49+
* Outline meshes using StencilBuffer (blue to children objs, orange to parent objs)
5050
* Viewport options to configure all Engine Speeds in Configuration panel
5151
* (?)Info - Help markers
5252
* Change mouse icon when click middle mouse button
-3.31 KB
Binary file not shown.
-1.61 MB
Binary file not shown.

WhispEngine/WhispEngine/GameObject.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ GameObject::~GameObject()
2626
*i = nullptr;
2727
}
2828
children.clear();
29+
30+
if (this == App->object_manager->GetSelected())
31+
App->object_manager->SetSelected(nullptr);
2932
}
3033

3134
void GameObject::Update()

WhispEngine/WhispEngine/ModuleImport.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ bool ModuleImport::ImportFbx(const char * path)
7171

7272
if (scene != nullptr && scene->HasMeshes())
7373
{
74+
App->object_manager->SetSelected(nullptr);
7475
uint ticks = SDL_GetTicks(); //timer
7576
PerfTimer timer;
7677

WhispEngine/WhispEngine/ModuleObjectManager.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ GameObject * ModuleObjectManager::CreateGameObject(GameObject * parent)
7272

7373
void ModuleObjectManager::DestroyGameObject(GameObject * obj)
7474
{
75-
if (obj == selected)
76-
selected = nullptr;
77-
7875
obj->parent->children.erase(std::find(obj->parent->children.begin(), obj->parent->children.end(), obj));
7976
delete obj;
8077
}

0 commit comments

Comments
 (0)