-
Notifications
You must be signed in to change notification settings - Fork 389
Expand file tree
/
Copy pathComponent.cpp
More file actions
27 lines (23 loc) · 651 Bytes
/
Component.cpp
File metadata and controls
27 lines (23 loc) · 651 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
// ----------------------------------------------------------------
// From Game Programming in C++ by Sanjay Madhav
// Copyright (C) 2017 Sanjay Madhav. All rights reserved.
//
// Released under the BSD License
// See LICENSE in root directory for full details.
// ----------------------------------------------------------------
#include "Component.h"
#include "Actor.h"
Component::Component(Actor* owner, int updateOrder)
:mOwner(owner)
,mUpdateOrder(updateOrder)
{
// Add to actor's vector of components
mOwner->AddComponent(this);
}
Component::~Component()
{
mOwner->RemoveComponent(this);
}
void Component::Update(float deltaTime)
{
}