Added LocalCharacter, removed entityIndex

This commit is contained in:
Kayne Ruse
2014-12-19 19:44:34 +11:00
parent 07af05712b
commit 2ae2c48819
10 changed files with 104 additions and 31 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ public:
std::string SetAvatar(std::string s);
std::string GetAvatar() const;
private:
protected:
//metadata
int owner;
std::string handle;
+1 -1
View File
@@ -29,7 +29,7 @@ public:
BaseMonster() = default;
virtual ~BaseMonster() = default;
private:
protected:
//
};
-8
View File
@@ -38,10 +38,6 @@ SpriteSheet* Entity::GetSprite() {
//accessors & mutators
//-------------------------
int Entity::SetEntityIndex(int i) {
return entityIndex = i;
}
Vector2 Entity::SetOrigin(Vector2 v) {
return origin = v;
}
@@ -54,10 +50,6 @@ BoundingBox Entity::SetBounds(BoundingBox b) {
return bounds = b;
}
int Entity::GetEntityIndex() {
return entityIndex;
}
Vector2 Entity::GetOrigin() {
return origin;
}
-3
View File
@@ -35,12 +35,10 @@ public:
SpriteSheet* GetSprite();
//accessors & mutators
int SetEntityIndex(int i);
Vector2 SetOrigin(Vector2 v);
Vector2 SetMotion(Vector2 v);
BoundingBox SetBounds(BoundingBox b);
int GetEntityIndex();
Vector2 GetOrigin();
Vector2 GetMotion();
BoundingBox GetBounds();
@@ -50,7 +48,6 @@ protected:
virtual ~Entity() = default;
SpriteSheet sprite;
int entityIndex = -1;
Vector2 origin;
Vector2 motion;
BoundingBox bounds;
+23
View File
@@ -0,0 +1,23 @@
/* Copyright: (c) Kayne Ruse 2014
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#include "local_character.hpp"
+34
View File
@@ -0,0 +1,34 @@
/* Copyright: (c) Kayne Ruse 2014
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef LOCALCHARACTER_HPP_
#define LOCALCHARACTER_HPP_
#include "base_character.hpp"
class LocalCharacter: public BaseCharacter {
public:
//
private:
//NOTE: NO MEMBERS
};
#endif