diff --git a/.gitignore b/.gitignore index 93202be..b370d1f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ .vs/ Debug/ x64/ +*.vcxproj +*.vcxproj.filters +*.user # Prerequisites *.d @@ -36,4 +39,47 @@ x64/ *.exe *.out *.app - +Adam/Adam.vcxproj +Adam/Adam.vcxproj.filters +CMakeLists.txt +cmake-build-debug/Makefile +cmake-build-debug/CMakeFiles/TargetDirectories.txt +cmake-build-debug/CMakeFiles/progress.marks +cmake-build-debug/CMakeFiles/Makefile2 +cmake-build-debug/CMakeFiles/Makefile.cmake +cmake-build-debug/CMakeFiles/feature_tests.cxx +cmake-build-debug/CMakeFiles/feature_tests.c +cmake-build-debug/CMakeFiles/feature_tests.bin +cmake-build-debug/CMakeFiles/CMakeOutput.log +cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake +cmake-build-debug/CMakeFiles/cmake.check_cache +cmake-build-debug/CMakeFiles/clion-log.txt +cmake-build-debug/CMakeFiles/clion-environment.txt +cmake-build-debug/CMakeFiles/Adam.dir/progress.make +cmake-build-debug/CMakeFiles/Adam.dir/objects1.rsp +cmake-build-debug/CMakeFiles/Adam.dir/linklibs.rsp +cmake-build-debug/CMakeFiles/Adam.dir/link.txt +cmake-build-debug/CMakeFiles/Adam.dir/includes_CXX.rsp +cmake-build-debug/CMakeFiles/Adam.dir/flags.make +cmake-build-debug/CMakeFiles/Adam.dir/DependInfo.cmake +cmake-build-debug/CMakeFiles/Adam.dir/depend.make +cmake-build-debug/CMakeFiles/Adam.dir/cmake_clean.cmake +cmake-build-debug/CMakeFiles/Adam.dir/build.make +cmake-build-debug/CMakeFiles/3.12.2/CompilerIdCXX/CMakeCXXCompilerId.cpp +cmake-build-debug/CMakeFiles/3.12.2/CompilerIdC/CMakeCCompilerId.c +cmake-build-debug/CMakeFiles/3.12.2/CMakeSystem.cmake +cmake-build-debug/CMakeFiles/3.12.2/CMakeRCCompiler.cmake +cmake-build-debug/CMakeFiles/3.12.2/CMakeDetermineCompilerABI_CXX.bin +cmake-build-debug/CMakeFiles/3.12.2/CMakeDetermineCompilerABI_C.bin +cmake-build-debug/CMakeFiles/3.12.2/CMakeCXXCompiler.cmake +cmake-build-debug/CMakeFiles/3.12.2/CMakeCCompiler.cmake +cmake-build-debug/CMakeCache.txt +cmake-build-debug/cmake_install.cmake +cmake-build-debug/Adam.cbp +cmake-build-debug/CMakeFiles/Adam.dir/CXX.includecache +cmake-build-debug/CMakeFiles/Adam.dir/depend.internal +cmake-build-debug/CMakeFiles/Progress/1 +cmake-build-debug/CMakeFiles/Progress/2 +cmake-build-debug/CMakeFiles/Progress/3 +cmake-build-debug/CMakeFiles/Progress/4 +cmake-build-debug/CMakeFiles/Progress/count.txt diff --git a/Adam.sln b/Adam.sln index 9b0af34..0a44460 100644 --- a/Adam.sln +++ b/Adam.sln @@ -1,4 +1,3 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28010.2041 @@ -15,12 +14,10 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {09BC51D3-F562-4978-B5E7-67120379C21F}.Debug|x64.ActiveCfg = Debug|x64 {09BC51D3-F562-4978-B5E7-67120379C21F}.Debug|x64.Build.0 = Debug|x64 - {09BC51D3-F562-4978-B5E7-67120379C21F}.Debug|x86.ActiveCfg = Debug|Win32 - {09BC51D3-F562-4978-B5E7-67120379C21F}.Debug|x86.Build.0 = Debug|Win32 + {09BC51D3-F562-4978-B5E7-67120379C21F}.Debug|x86.ActiveCfg = Debug|x64 {09BC51D3-F562-4978-B5E7-67120379C21F}.Release|x64.ActiveCfg = Release|x64 {09BC51D3-F562-4978-B5E7-67120379C21F}.Release|x64.Build.0 = Release|x64 - {09BC51D3-F562-4978-B5E7-67120379C21F}.Release|x86.ActiveCfg = Release|Win32 - {09BC51D3-F562-4978-B5E7-67120379C21F}.Release|x86.Build.0 = Release|Win32 + {09BC51D3-F562-4978-B5E7-67120379C21F}.Release|x86.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -28,4 +25,4 @@ Global GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {29189A62-F05C-4CDF-9A6A-D8848D2DE15B} EndGlobalSection -EndGlobal +EndGlobal \ No newline at end of file diff --git a/Adam/AI.cpp b/Adam/AI.cpp new file mode 100644 index 0000000..eb48d67 --- /dev/null +++ b/Adam/AI.cpp @@ -0,0 +1,90 @@ +#include "pch.h" +#include "AI.hpp" + + +void AI::shouldFollow_followDirection(Enemy * p1, Character * p2) { + + //Check if p1 and p2 are close to each other + // if so, make enemy move towarts the player + if ((p1->getPosition() - p2->getPosition()).x <= 200 && (p1->getPosition() - p2->getPosition()).x > 10) { + if (p1->currentAnimation.isDone() || p1->getCurrentAnimation() == std::string("WALKright")) { + if (!p1->fight(p2)) { + if (p1->getCurrentAnimation() != "WALKright") { + p1->setAnimation("WALKright", Animation::intervals::walk); + p1->setTexture(p1->currentAnimation.nextFrame()); + } + + p1->updateFollowPosition(-1); + } + + p1->setScale(sf::Vector2f(-0.2, 0.2)); + } + + return; + } + else if ((p1->getPosition() - p2->getPosition()).x >= -200 && (p1->getPosition() - p2->getPosition()).x < 10) { + if (p1->currentAnimation.isDone() || p1->getCurrentAnimation() == std::string("WALKright")) { + if (!p1->fight(p2)) { + if (p1->getCurrentAnimation() != "WALKright") { + p1->setAnimation("WALKright", Animation::intervals::walk); + p1->setTexture(p1->currentAnimation.nextFrame()); + } + + p1->updateFollowPosition(1); + } + p1->setScale(sf::Vector2f(0.2, 0.2)); + } + + return; + } + else { + // if they are not close to eachother + // make sure the enemy's velocity is zero + if (p1->getCurrentAnimation() != std::string("IDLEright")) { + p1->setAnimation("IDLEright", Animation::intervals::idle); + p1->setTexture(p1->currentAnimation.nextFrame()); + p1->updateFollowPosition(0); + } + + } + +} + +void AI::walkRandomly(npc * p1) { + p1->updateState(); + int dir = p1->getDirection(); + + if (p1->isWalking()) { + if (p1->getCurrentAnimation() != "WALKright") { + p1->setAnimation("WALKright", Animation::intervals::walk); + p1->setTexture(p1->currentAnimation.nextFrame()); + + } + if (p1->originPosition.x - p1->getPosition().x > 100) { + p1->setScale(sf::Vector2f(0.2, 0.2)); + p1->current_direction = movable::direction::RIGHT; + + } else if (p1->originPosition.x - p1->getPosition().x < -100) { + p1->setScale(sf::Vector2f(-0.2, 0.2)); + p1->current_direction = movable::direction::LEFT; + + } + + if (p1->getVelocity().x == 0 && p1->lastDirection != 0) { + p1->walkTheOtherWay(); + p1->setVelocity(sf::Vector2f(0, -9)); + } p1->setVelocity(sf::Vector2f(dir, p1->getVelocity().y)); + p1->lastDirection = 1; + + } + else { + if (p1->getCurrentAnimation() != "IDLEright") { + p1->setAnimation("IDLEright", Animation::intervals::idle); + p1->setTexture(p1->currentAnimation.nextFrame()); + } + p1->setVelocity(sf::Vector2f(0,p1->getVelocity().y)); + p1->lastDirection = 0; + } + + +} \ No newline at end of file diff --git a/Adam/AI.hpp b/Adam/AI.hpp new file mode 100644 index 0000000..a27506e --- /dev/null +++ b/Adam/AI.hpp @@ -0,0 +1,18 @@ +#pragma once +#include "Movable.h" +#include "Enemy.hpp" +#include "npc.hpp" +#include "Character.h" + + +class AI { + +public: + AI() { + + } + + void shouldFollow_followDirection(Enemy * p1, Character * p2); + void walkRandomly(npc * p1); + +}; diff --git a/Adam/Animated.cpp b/Adam/Animated.cpp new file mode 100644 index 0000000..2dfd2d8 --- /dev/null +++ b/Adam/Animated.cpp @@ -0,0 +1,38 @@ +#include "pch.h" +#include "Animated.hpp" + +Animateable::Animateable(std::map & animations): + animations(animations) +{ + currentAnimation = animations.begin()->second; +} + +Animation Animateable::getAnimation(std::string animation) { + return animations[animation]; +} + +bool Animateable::updateAnimation() +{ + if (timer.getElapsedTime().asMilliseconds() > animation_interval) + { + currentAnimation.nextFrame(); + timer.restart(); + return true; + } + + return false; +} + +std::string Animateable::getCurrentAnimation() { + return currentAnimation.name; +} + +void Animateable::setAnimation(std::string animation, int interval) { + animation_interval = interval; + currentAnimation = animations[animation]; +} + +void Animateable::setAnimationMap(std::map newAnimations) +{ + animations = newAnimations; +} diff --git a/Adam/Animated.hpp b/Adam/Animated.hpp new file mode 100644 index 0000000..84d5de7 --- /dev/null +++ b/Adam/Animated.hpp @@ -0,0 +1,24 @@ +#pragma once +#include "pch.h" +#include "Animation.h" +class Animateable { +protected: + std::map animations; +public: + Animation currentAnimation; + int animation_interval = 0; + sf::Clock timer; + + void setAnimation(std::string animation, int interval); + void setAnimationMap(std::map newAnimations); + + Animateable() {} + ~Animateable() {} + Animateable(std::map & animations); + + Animation getAnimation(std::string animation); + std::string getCurrentAnimation(); + bool updateAnimation(); + bool currentAnimationIsDone() { return currentAnimation.isDone(); } +}; + diff --git a/Adam/Animation.cpp b/Adam/Animation.cpp new file mode 100644 index 0000000..08eeb60 --- /dev/null +++ b/Adam/Animation.cpp @@ -0,0 +1,62 @@ +#include "pch.h" +#include "Animation.h" +#include +Animation::~Animation() +{ +} + +void Animation::addFrame(const std::string & location) +{ + sf::Texture t; + textures.emplace_back(t); + Collision::CreateTextureAndBitmask(textures.back(), location); +} + +void Animation::addFrame(sf::Texture & texture) +{ + textures.emplace_back(texture); +} + +sf::Texture & Animation::nextFrame() +{ + if (current_frame == textures.size() -1) { + current_frame = -1; + animation_done = true; + } + if (animation_done && name == "DYINGright") { + return textures.back(); + } + return textures[++current_frame]; +} + +sf::Texture & Animation::getCurrentFrame() +{ + if (current_frame == textures.size()) { + return textures.back(); + } + else { + return textures[(current_frame == -1 ) ? 0 : current_frame]; + } +} + + +void Animation::reset_animation() +{ + animation_done = false; + current_frame = -1; +} +void Animation::print() { + std::cout << name << " "; +} + +bool Animation::operator==(Animation &rhs) { + return this->name == rhs.name; +} + +bool Animation::operator!=(Animation &rhs) { + return this->name != rhs.name; +} + +bool Animation::operator!=(Animation rhs) { + return this->name != rhs.name; +} \ No newline at end of file diff --git a/Adam/Animation.h b/Adam/Animation.h new file mode 100644 index 0000000..430a763 --- /dev/null +++ b/Adam/Animation.h @@ -0,0 +1,34 @@ +#pragma once +#include "Collision.h" +class Animation +{ +private: + bool animation_done; + int current_frame; +public: + + enum intervals + { + idle = 50, + walk = 10, + attack = 50, + dying = 50, + }; + + std::string name = "default"; + std::vector textures; + Animation() :animation_done(false), current_frame(0), textures() {}; + Animation(std::string name) :name(name), animation_done(false), current_frame(0), textures() {}; + ~Animation(); + void addFrame(const std::string & location); + void addFrame(sf::Texture & texture); + sf::Texture & nextFrame(); + sf::Texture & getCurrentFrame(); + void reset_animation(); + bool isDone() { return animation_done; } + void print(); + bool operator==(Animation & rhs); + bool operator!=(Animation & rhs); + bool operator!=(Animation rhs); +}; + diff --git a/Adam/AnimationManager.cpp b/Adam/AnimationManager.cpp new file mode 100644 index 0000000..7ec03c5 --- /dev/null +++ b/Adam/AnimationManager.cpp @@ -0,0 +1,43 @@ +#include "pch.h" +#include "AnimationManager.h" + + +AnimationManager::AnimationManager(const std::string & s) +{ + std::ifstream in(s, std::ios::in | std::ios::binary); + if (!in) { + std::cout << "Couldn't open " << s << std::endl; + } + std::string object, action, path = ""; + while (in >> object >> action >> path) { + Animation a(action); + auto pos = animations.find(object); + if (pos != animations.end()) { + auto pos2 = pos->second.find(action); + if (pos2 != pos->second.end()) { + a = pos2->second; + } + else { + pos->second[action] = a; + } + }else{ + animations[object][action] = a; + } + animations[object][action].addFrame("assets/" + path); + } +} + +void AnimationManager::print() +{ + for (auto elem : animations) + { + for (auto m : elem.second) { + std::cout << elem.first << " " << m.first << " " << m.second.textures.size() << std::endl; + } + + } +} + +AnimationManager::~AnimationManager() +{ +} diff --git a/Adam/AnimationManager.h b/Adam/AnimationManager.h new file mode 100644 index 0000000..e63b06b --- /dev/null +++ b/Adam/AnimationManager.h @@ -0,0 +1,11 @@ +#pragma once +#include "Animation.h" +class AnimationManager +{ +public: + std::map> animations; + AnimationManager(const std::string & s); + AnimationManager() {} + void print(); + ~AnimationManager(); +}; \ No newline at end of file diff --git a/Adam/Audio.cpp b/Adam/Audio.cpp new file mode 100644 index 0000000..b770b4e --- /dev/null +++ b/Adam/Audio.cpp @@ -0,0 +1,51 @@ +#include "pch.h" + +#include "Audio.hpp" +// +Audio::Audio(const std::string &filePath) +{ + std::ifstream soundFile(filePath, std::ios::in | std::ios::binary); + if(!soundFile) + { + std::cout << "ERROR: SoundFile couldn't be opened!" << std::endl; + } + std::string factorySound, path = ""; + while (soundFile >> factorySound >> path) + { + sf::SoundBuffer b; + sf::Sound s; + if (!b.loadFromFile(path)) + { + std::cout << path << "Audio File Buffer error" << std::endl; + } + s.setBuffer(b); + if (soundCollection.count(factorySound)) + { + soundCollection[factorySound].push_back(b); + std::cout << " pushing back sound into vector" << path << std::endl; + } + else + { + std::cout << " adding sound into vector manually" << path << std::endl; + soundCollection[factorySound] = { b }; + } + + } + + sound.setBuffer(soundCollection["Fireball"][1]); +} + +void Audio::playSound(const std::string &key) +{ + + std::cout << "in function playSound " << std::endl; + if (sound.getStatus()!=sf::SoundSource::Status::Playing) + { + + int random = rand() % (soundCollection[key].size()-1); + sound.setBuffer(soundCollection[key][random]); + std::cout << key << ' ' << random << ' ' << std::endl; + sound.play(); + } + +} diff --git a/Adam/Audio.hpp b/Adam/Audio.hpp new file mode 100644 index 0000000..b9d4cfa --- /dev/null +++ b/Adam/Audio.hpp @@ -0,0 +1,21 @@ +#ifndef AUDIO_HPP +#define AUDIO_HPP + +#include "pch.h" +#include "Character.h" +#include "Enemy.hpp" + +class Audio +{ +private: + std::map>soundCollection; + sf::SoundBuffer buffer; + sf::Music music; + sf::Sound sound; +public: + Audio(const std::string &filePath); + + void playSound(const std::string &key); + +}; +#endif //AUDIO_HPP \ No newline at end of file diff --git a/Adam/Character.cpp b/Adam/Character.cpp new file mode 100644 index 0000000..cd1bb90 --- /dev/null +++ b/Adam/Character.cpp @@ -0,0 +1,99 @@ +#include "pch.h" +#include "Character.h" + +void Character::respawn() +{ + setPosition(spawn); + health.current = health.max; +} + +void Character::set_spawn(sf::Vector2f new_spawn) +{ + spawn = new_spawn; +} + +Character::Character(sf::Vector2f position, sf::Vector2f scale, std::map animations, sf::Vector2f velocity, statistic mana_c, statistic health_c, statistic exp_c): + + Animateable(animations), + fighter(health_c, 1), + movable(position, scale, animations["IDLEright"].textures[0], velocity) +{ + setAnimation("IDLEright", Animation::intervals::idle); + setTexture(currentAnimation.nextFrame()); + mana = mana_c; + exp = exp_c; +} + +bool Character::fight(fighter * opponent) { + if (getCurrentAnimation() != "SLASHINGright") { + setAnimation("SLASHINGright", Animation::intervals::attack); + setTexture(currentAnimation.nextFrame()); + } + if (fighter::fight(opponent)) { + + if (fighter::checkDead()) { + setPosition(sf::Vector2f(890, 690)); + health.current = health.max; + } + else if (opponent->checkDead()) { + update_exp(40); + } + return true; + } + return false; +} + +sf::Sprite Character::makeFightBox() { + auto temp = sf::Sprite(); + temp.setPosition(position); + temp.setTexture(AABB_H); + temp.setScale(scale); + return temp; +} + +void Character::setProjectile(std::function(sf::Vector2f, sf::Vector2f, std::map animations)> newP, std::map & animations ) { + projectileAnimations = animations; + shoot = newP; +} + +std::shared_ptr Character::shootProjectile(sf::Vector2f direction) { + sf::Vector2f shootPos; +// if (current_direction == direction::LEFT) { +// shootPos = getBox().getPosition +// } + return shoot(getPosition(), sf::Vector2f(direction.x, direction.y ), projectileAnimations); +} + +void Character::die() +{ + if (getCurrentAnimation() != std::string("DYINGright")) { + setAnimation("DYINGright", Animation::intervals::dying); + setTexture(currentAnimation.nextFrame()); + } + else { + if (currentAnimationIsDone()) { + respawn(); + setAnimation("IDLEright", Animation::intervals::idle); + setTexture(currentAnimation.nextFrame()); + } + } +} + +sf::Sprite Character::getBox() { + return drawable::getBox(); +} + + +Character::~Character() +{ +} + +void Character::update_exp(int amount) +{ + exp.add(amount); + if (exp.is_max()) { + lvl++; + exp.set_max(exp.max + 20); + exp.zero(); + } +} \ No newline at end of file diff --git a/Adam/Character.h b/Adam/Character.h new file mode 100644 index 0000000..5e67a17 --- /dev/null +++ b/Adam/Character.h @@ -0,0 +1,36 @@ +#pragma once +#include "Collision.h" +#include "statistic.h" +#include "Movable.h" +#include "Animated.hpp" +#include "fighter.h" +#include "projectile.hpp" + +class Character : public fighter, public Animateable, public movable +{ + std::function(sf::Vector2f, sf::Vector2f, std::map a)> shoot = [&](sf::Vector2f pos1, sf::Vector2f pos2, std::map animations) {return std::make_shared( projectile());}; + std::map projectileAnimations; +public: + statistic mana; + statistic exp; + sf::Vector2f spawn = sf::Vector2f(890,690); + + void update_exp(int amount); + Character() {} + void respawn(); + void set_spawn(sf::Vector2f new_spawn); + + bool fight(fighter * opponent) override; + + sf::Sprite getBox() override; + sf::Sprite makeFightBox() override; + + void setProjectile(std::function(sf::Vector2f, sf::Vector2f, std::map)> newS, std::map & animations); + std::shared_ptr shootProjectile(sf::Vector2f direction); + + void die(); + + Character(sf::Vector2f position, sf::Vector2f scale, std::map animations, sf::Vector2f velocity, statistic mana_c = statistic(100, 100), statistic health_c = statistic(100, 100), statistic exp_c = statistic(0, 100)); + ~Character(); +}; + diff --git a/Adam/Collision.cpp b/Adam/Collision.cpp new file mode 100644 index 0000000..ff6126b --- /dev/null +++ b/Adam/Collision.cpp @@ -0,0 +1,199 @@ +/* + * File: collision.cpp + * Author: Nick (original version), ahnonay (SFML2 compatibility) + */ +#include "pch.h" +#include "Collision.h" + +namespace Collision +{ + class BitmaskManager + { + public: + ~BitmaskManager() { + std::map::const_iterator end = Bitmasks.end(); + for (std::map::const_iterator iter = Bitmasks.begin(); iter != end; iter++) + delete[] iter->second; + } + + sf::Uint8 GetPixel(const sf::Uint8* mask, const sf::Texture* tex, unsigned int x, unsigned int y) { + if (x > tex->getSize().x || y > tex->getSize().y) + return 0; + + return mask[x + y * tex->getSize().x]; + } + + sf::Uint8* GetMask(const sf::Texture* tex) { + sf::Uint8* mask; + std::map::iterator pair = Bitmasks.find(tex); + if (pair == Bitmasks.end()) + { + sf::Image img = tex->copyToImage(); + mask = CreateMask(tex, img); + } + else + mask = pair->second; + + return mask; + } + + void removeMask(const sf::Texture* tex) + { + Bitmasks.erase(tex); + } + + sf::Uint8* CreateMask(const sf::Texture* tex, const sf::Image& img) { + sf::Uint8* mask = new sf::Uint8[tex->getSize().y*tex->getSize().x]; + + for (unsigned int y = 0; y < tex->getSize().y; y++) + { + for (unsigned int x = 0; x < tex->getSize().x; x++) + mask[x + y * tex->getSize().x] = img.getPixel(x, y).a; + } + + Bitmasks.insert(std::pair(tex, mask)); + + return mask; + } + private: + std::map Bitmasks; + }; + + BitmaskManager Bitmasks; + + void removeBitmask(const sf::Texture* tex) + { + Bitmasks.removeMask(tex); + } + + bool PixelPerfectTest(const sf::Sprite& Object1, const sf::Sprite& Object2, sf::Uint8 AlphaLimit) { + sf::FloatRect Intersection; + if (Object1.getGlobalBounds().intersects(Object2.getGlobalBounds(), Intersection)) { + sf::IntRect O1SubRect = Object1.getTextureRect(); + sf::IntRect O2SubRect = Object2.getTextureRect(); + + sf::Uint8* mask1 = Bitmasks.GetMask(Object1.getTexture()); + sf::Uint8* mask2 = Bitmasks.GetMask(Object2.getTexture()); + + // Loop through our pixels + for (int i = Intersection.left; i < Intersection.left + Intersection.width; i++) { + for (int j = Intersection.top; j < Intersection.top + Intersection.height; j++) { + + sf::Vector2f o1v = Object1.getInverseTransform().transformPoint(i, j); + sf::Vector2f o2v = Object2.getInverseTransform().transformPoint(i, j); + + // Make sure pixels fall within the sprite's subrect + if (o1v.x > 0 && o1v.y > 0 && o2v.x > 0 && o2v.y > 0 && + o1v.x < O1SubRect.width && o1v.y < O1SubRect.height && + o2v.x < O2SubRect.width && o2v.y < O2SubRect.height) { + + if (Bitmasks.GetPixel(mask1, Object1.getTexture(), (int)(o1v.x) + O1SubRect.left, (int)(o1v.y) + O1SubRect.top) > AlphaLimit && + Bitmasks.GetPixel(mask2, Object2.getTexture(), (int)(o2v.x) + O2SubRect.left, (int)(o2v.y) + O2SubRect.top) > AlphaLimit) + return true; + + } + } + } + } + return false; + } + + bool CreateTextureAndBitmask(sf::Texture &LoadInto, const std::string& Filename) + { + sf::Image img; + if (!img.loadFromFile(Filename)) + return false; + if (!LoadInto.loadFromImage(img)) + return false; + + Bitmasks.CreateMask(&LoadInto, img); + return true; + } + + sf::Vector2f GetSpriteCenter(const sf::Sprite& Object) + { + sf::FloatRect AABB = Object.getGlobalBounds(); + return sf::Vector2f(AABB.left + AABB.width / 2.f, AABB.top + AABB.height / 2.f); + } + + sf::Vector2f GetSpriteSize(const sf::Sprite& Object) + { + sf::IntRect OriginalSize = Object.getTextureRect(); + sf::Vector2f Scale = Object.getScale(); + return sf::Vector2f(OriginalSize.width*Scale.x, OriginalSize.height*Scale.y); + } + + bool CircleTest(const sf::Sprite& Object1, const sf::Sprite& Object2) { + sf::Vector2f Obj1Size = GetSpriteSize(Object1); + sf::Vector2f Obj2Size = GetSpriteSize(Object2); + float Radius1 = (Obj1Size.x + Obj1Size.y) / 4; + float Radius2 = (Obj2Size.x + Obj2Size.y) / 4; + + sf::Vector2f Distance = GetSpriteCenter(Object1) - GetSpriteCenter(Object2); + + return (Distance.x * Distance.x + Distance.y * Distance.y <= (Radius1 + Radius2) * (Radius1 + Radius2)); + } + + class OrientedBoundingBox // Used in the BoundingBoxTest + { + public: + OrientedBoundingBox(const sf::Sprite& Object) // Calculate the four points of the OBB from a transformed (scaled, rotated...) sprite + { + sf::Transform trans = Object.getTransform(); + sf::IntRect local = Object.getTextureRect(); + Points[0] = trans.transformPoint(0.f, 0.f); + Points[1] = trans.transformPoint(local.width, 0.f); + Points[2] = trans.transformPoint(local.width, local.height); + Points[3] = trans.transformPoint(0.f, local.height); + } + + sf::Vector2f Points[4]; + + void ProjectOntoAxis(const sf::Vector2f& Axis, float& Min, float& Max) // Project all four points of the OBB onto the given axis and return the dotproducts of the two outermost points + { + Min = (Points[0].x*Axis.x + Points[0].y*Axis.y); + Max = Min; + for (int j = 1; j < 4; j++) + { + float Projection = (Points[j].x*Axis.x + Points[j].y*Axis.y); + + if (Projection < Min) + Min = Projection; + if (Projection > Max) + Max = Projection; + } + } + }; + + bool BoundingBoxTest(const sf::Sprite& Object1, const sf::Sprite& Object2) { + OrientedBoundingBox OBB1(Object1); + OrientedBoundingBox OBB2(Object2); + + // Create the four distinct axes that are perpendicular to the edges of the two rectangles + sf::Vector2f Axes[4] = { + sf::Vector2f(OBB1.Points[1].x - OBB1.Points[0].x, + OBB1.Points[1].y - OBB1.Points[0].y), + sf::Vector2f(OBB1.Points[1].x - OBB1.Points[2].x, + OBB1.Points[1].y - OBB1.Points[2].y), + sf::Vector2f(OBB2.Points[0].x - OBB2.Points[3].x, + OBB2.Points[0].y - OBB2.Points[3].y), + sf::Vector2f(OBB2.Points[0].x - OBB2.Points[1].x, + OBB2.Points[0].y - OBB2.Points[1].y) + }; + + for (int i = 0; i < 4; i++) // For each axis... + { + float MinOBB1, MaxOBB1, MinOBB2, MaxOBB2; + + // ... project the points of both OBBs onto the axis ... + OBB1.ProjectOntoAxis(Axes[i], MinOBB1, MaxOBB1); + OBB2.ProjectOntoAxis(Axes[i], MinOBB2, MaxOBB2); + + // ... and check whether the outermost projected points of both OBBs overlap. + // If this is not the case, the Separating Axis Theorem states that there can be no collision between the rectangles + if (!((MinOBB2 <= MaxOBB1) && (MaxOBB2 >= MinOBB1))) + return false; + } + return true; + } +} \ No newline at end of file diff --git a/Adam/Collision.h b/Adam/Collision.h new file mode 100644 index 0000000..e53cfcc --- /dev/null +++ b/Adam/Collision.h @@ -0,0 +1,80 @@ +/* + * File: collision.h + * Authors: Nick Koirala (original version), ahnonay (SFML2 compatibility) + * + * Collision Detection and handling class + * For SFML2. + +Notice from the original version: + +(c) 2009 - LittleMonkey Ltd + +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. + + * + * Created on 30 January 2009, 11:02 + */ + +#ifndef COLLISION_H +#define COLLISION_H + +namespace Collision { + + /// \details + /// Test for a collision between two sprites by comparing the alpha values of overlapping pixels + /// Supports scaling and rotation + /// AlphaLimit: The threshold at which a pixel becomes "solid". If AlphaLimit is 127, a pixel with + /// alpha value 128 will cause a collision and a pixel with alpha value 126 will not. + /// This functions creates bitmasks of the textures of the two sprites by + /// downloading the textures from the graphics card to memory -> SLOW! + /// You can avoid this by using the "CreateTextureAndBitmask" function + bool PixelPerfectTest(const sf::Sprite& Object1, const sf::Sprite& Object2, sf::Uint8 AlphaLimit = 0); + + /// \details + /// Not part of the original code provided by the original author. + /// Provides a way to remove a bitmask from the bitmask manager, useful when changing the texture of + /// an object that already had a bitmask, it needs to be removed and re-added. + void removeBitmask(const sf::Texture* tex); + + /// /details + /// Replaces Texture::loadFromFile + /// Load an imagefile into the given texture and create a bitmask for it + /// This is much faster than creating the bitmask for a texture on the first run of "PixelPerfectTest" + /// The function returns false if the file could not be opened for some reason. + bool CreateTextureAndBitmask(sf::Texture &LoadInto, const std::string& Filename); + + /// \details + /// Test for collision using circle collision dection + /// Radius is averaged from the dimensions of the sprite so + /// roughly circular objects will be much more accurate. + bool CircleTest(const sf::Sprite& Object1, const sf::Sprite& Object2); + + /// \details + /// Test for bounding box collision using the Separating Axis Theorem + /// Supports scaling and rotation + bool BoundingBoxTest(const sf::Sprite& Object1, const sf::Sprite& Object2); + + /// \details + /// Helper function to get the center of an SFML sprite. + sf::Vector2f GetSpriteCenter(const sf::Sprite& Object); +} + +#endif /* COLLISION_H */ diff --git a/Adam/Drawable.cpp b/Adam/Drawable.cpp new file mode 100644 index 0000000..1041226 --- /dev/null +++ b/Adam/Drawable.cpp @@ -0,0 +1,49 @@ +#include "pch.h" +#include "Drawable.h" + +drawable::drawable(sf::Vector2f &position, sf::Vector2f scale, sf::Texture texture): + position(position), + scale(scale), + texture(texture) +{ + sprite.setPosition(position); + sprite.setTexture(texture); + sprite.setScale(scale); + AABB.loadFromFile("assets/AABB.png"); +} + +drawable::drawable(sf::Vector2f &position, sf::Vector2f scale, const std::string &textureFile) : + position(position), + scale(scale) + //texture(texture) +{ + Collision::CreateTextureAndBitmask(texture, textureFile); + sprite.setPosition(position); + sprite.setTexture(texture, true); + sprite.setScale(scale); + AABB.loadFromFile("assets/AABB.png"); +} + +sf::Vector2f drawable::getPosition() { + return position; +} + +void drawable::setPosition(sf::Vector2f newPos) { + position = newPos; + sprite.setPosition(position); +} + +void drawable::setTexture(const std::string & textureFile) { + Collision::CreateTextureAndBitmask(texture, textureFile); + sprite.setTexture(texture); +} + +void drawable::setTexture(sf::Texture & texture) { + sprite.setTexture(texture, true); + texture = texture; +} + +void drawable::draw(sf::RenderTarget &w) { + w.draw(sprite); +} + diff --git a/Adam/Drawable.h b/Adam/Drawable.h new file mode 100644 index 0000000..b47454a --- /dev/null +++ b/Adam/Drawable.h @@ -0,0 +1,70 @@ +#pragma once +#include "Collision.h" + +///@file + +/// \brief +/// drawable class +/// \details +/// Provides an inheritable interface for the game entities to be drawn to the game window. +/// Since the games' collision is pixel perfect overlap, we treat complex pixel shapes as boxes by using getBox(). +class drawable { +protected: + sf::Sprite sprite; + sf::Vector2f position; + sf::Texture texture; + sf::Vector2f scale; + +public: + sf::Texture AABB; + + /// \details + /// default class constructor, only loads the AABB hitbox texture from disk. + drawable() { + AABB.loadFromFile("assets/AABB.png"); + } + + /// \details + /// class constructor that sets the position, scale and texture. + drawable(sf::Vector2f &position, sf::Vector2f scale, sf::Texture texture); + drawable(sf::Vector2f &position, sf::Vector2f scale, const std::string &textureFile); + ~drawable() {} + + /// \details + /// Get current sprite position. + sf::Vector2f getPosition(); + + /// \details + /// Sets the position and moves the sprite. + void setPosition(sf::Vector2f newPos); + + /// \details + /// Takes a string that represents the file path of texture image you want to load on the sprite. + void setTexture(const std::string & textureFile); + + /// \details + /// Takes an lvalue texture and loads it on the sprite. + void setTexture(sf::Texture & texture); + + /// \details + /// Draws the sprite onto a render target (e.g sf::RenderWindow) + void draw(sf::RenderTarget &w); + + /// \details + /// Helper function to get the "hitbox" of a drawable, the texture loaded is a fixed size rectangle, + /// slightly smaller than the original sprite. + virtual sf::Sprite getBox() { + auto temp = sf::Sprite(); + temp.setPosition(position); + temp.setTexture(AABB); + temp.setScale(scale); + return temp; + } + + /// \details + /// Used to cast/get the drawable's sprite. + operator sf::Sprite() { + return sprite; + } + +}; \ No newline at end of file diff --git a/Adam/Enemy.cpp b/Adam/Enemy.cpp new file mode 100644 index 0000000..a7243f2 --- /dev/null +++ b/Adam/Enemy.cpp @@ -0,0 +1,128 @@ +#include "pch.h" +#include "Enemy.hpp" + +Enemy::Enemy(sf::Vector2f position, sf::Vector2f scale, std::map & animations, sf::Vector2f velocity, statistic health_c): + fighter(health_c, 1), + Animateable(animations), + movable(position, scale, animations["IDLEright"].textures[0], velocity) +{ + health = health_c; + texture = animations["IDLEright"].textures[0]; + setAnimation("IDLEright", Animation::intervals::idle); + if (!font.loadFromFile("fonts/stranger.ttf")) + { + std::cout << "error loading font" << std::endl; + } + update_info(); + + for (auto & tex: text) + { + tex.setFont(font); + tex.setOutlineColor(sf::Color::Black); + tex.setOutlineThickness(2.0f); + tex.setScale(sf::Vector2f(0.1, 0.1)); + tex.setCharacterSize(100); + } + text[0].setFillColor(sf::Color::Red); + text[1].setFillColor(sf::Color::White); +} + + +Enemy::~Enemy() +{ +} + +void Enemy::update_info() +{ + text[0].setString(std::to_string(health.current) + "/" + std::to_string(health.max) + '\n'); + text[1].setString(" lvl: " + std::to_string(lvl)); +} + +void Enemy::update_info_pos(sf::RenderWindow & window) +{ + text[0].setPosition(sf::Vector2f(position.x, position.y - 30)); + text[1].setPosition(sf::Vector2f(position.x, position.y - 30 + 12)); +} + +bool Enemy::fight(fighter * opponent) { + + if (!checkDead()) { + if (fighter::fight(opponent)) { + if (getCurrentAnimation() != std::string("SLASHINGright")) { + setAnimation("SLASHINGright", Animation::intervals::attack); + std::cout << getCurrentAnimation() << std::endl; + setTexture(currentAnimation.nextFrame()); + + } + if (fighter::checkDead()) { + setPosition(sf::Vector2f(890, 690)); + health.current = health.max; + } + return true; + } + } + return false; +} + + +void Enemy::updateFollowPosition(int x) { + if (!checkDead()) { + // make the enemy move (x is 0, 1, or -1) + setVelocity(sf::Vector2f(4 * x, getVelocity().y)); + } +} + +sf::Sprite Enemy::makeFightBox() { + auto temp = sf::Sprite(); + temp.setPosition(position); + temp.setTexture(AABB_H); + temp.setScale(scale); + return temp; +} + +sf::Sprite Enemy::getBox() { + if (state != STATE::DEAD) { + return drawable::getBox(); + } + else { + return sf::Sprite(); + } + +} + +void Enemy::setVelocity(sf::Vector2f newVel) { + if (state != STATE::DEAD) { + movable::setVelocity(newVel); + } + else { + movable::setVelocity(sf::Vector2f(0,0)); + } +} + + +void Enemy::die() +{ + state = STATE::DEAD; + if (getCurrentAnimation() != std::string("DYINGright")) { + setAnimation("DYINGright", Animation::intervals::dying); + setTexture(currentAnimation.nextFrame()); + } + else { + if (currentAnimationIsDone()) { + setTexture(currentAnimation.textures.back()); + } + } + health.zero(); + update_info(); +} + +void Enemy::draw(sf::RenderTarget &w) { + drawable::draw(w); + int j = -2; + for (auto & txt: text) { + txt.setPosition(sf::Vector2f(getPosition().x, getPosition().y + j * 10)); + w.draw(txt); + j++; + } +} + diff --git a/Adam/Enemy.hpp b/Adam/Enemy.hpp new file mode 100644 index 0000000..c15d7b4 --- /dev/null +++ b/Adam/Enemy.hpp @@ -0,0 +1,43 @@ +#ifndef _ENEMY_HPP +#define _ENEMY_HPP +#include "pch.h" +#include "Collision.h" +#include "statistic.h" +#include "Movable.h" +#include "fighter.h" +#include "Animated.hpp" + +class Enemy : public fighter, public Animateable, public movable +{ +private: + sf::Font font; + std::array text; + int teller = 0; + + enum class STATE { IDLE, FOLLOWING, DEAD }; + STATE state = STATE::IDLE; + +public: + + enum class direction { LEFT, RIGHT }; + direction current_direction = direction::RIGHT; + void update_info() override; + void update_info_pos(sf::RenderWindow & window) override; + Enemy() {} + Enemy(sf::Vector2f position, sf::Vector2f scale, std::map & animations, sf::Vector2f velocity, statistic health_c = statistic(100, 100)); + + bool fight(fighter * opponent) override; + + sf::Sprite makeFightBox() override; + + sf::Sprite getBox() override; + virtual void setVelocity(sf::Vector2f newVel) override; + + void updateFollowPosition(int x) override; + void die(); + void draw(sf::RenderTarget &w); + ~Enemy(); +}; + +#endif + diff --git a/Adam/Game.cpp b/Adam/Game.cpp new file mode 100644 index 0000000..2614aa9 --- /dev/null +++ b/Adam/Game.cpp @@ -0,0 +1,360 @@ +#include "pch.h" +#include "Game.hpp" +#include "Menu.hpp" +#include "npc.hpp" +#include "Audio.hpp" + +Game::Game(sf::RenderWindow &w, Character &player, HUD &hud, AnimationManager & ani, Audio & geluidje) : + + window(w), + player(player), + hud(hud), + ani(ani), + geluidje(geluidje) +{ + window.setVerticalSyncEnabled(true); + window.setKeyRepeatEnabled(false); + char_alpha = sf::Texture(); + char_alpha_invert = sf::Texture(); + menuTex = sf::Texture(); + + Collision::CreateTextureAndBitmask(menuTex, "assets/backgrounds/forest.png"); + bgMain = Sprite(menuTex); + Collision::CreateTextureAndBitmask(char_alpha, "assets/char_alpha.png"); + Collision::CreateTextureAndBitmask(char_alpha_invert, "assets/char_alpha_invert.png"); + + tex.loadFromFile("assets/slimeTest.png"); + lvls.next_lvl(player); + + main_camera.setCenter(player.getPosition()); + main_camera.setSize(640, 360); + + np = std::make_shared(v2(890, 690), v2(0.2, 0.2), ani.animations["boy"], v2(0, 0), statistic(200, 200)); + enemy = std::make_shared(v2(2050, 700), v2(0.2, 0.2), ani.animations["skull"], v2(0, 0), statistic(200, 200)); + + this->cln_h = Adam::collision_handler(lvls.ground); + + this->world_physics = Adam::physics(&player, cln_h); + + bgMain.setTexture(menuTex); + sf::Vector2f playerposforbg = player.getPosition(); + bgMain.setPosition(sf::Vector2f(playerposforbg.x - 960, playerposforbg.y - 540)); + + currentMenu = std::make_shared(window.getSize().x, window.getSize().y, player); + + + ai = std::make_shared(); + + world_physics.moveables.push_back(&*enemy); + world_physics.moveables.push_back(&*np); + + state = STATE::MENU; +} + + + + +void Game::handleInput() +{ + //do game stuff + switch (state) + { + case STATE::MENU: + { + sf::Event ev; + while (window.pollEvent(ev)) + { + if (ev.type == sf::Event::Closed) + { + window.close(); + } + switch (ev.type) + { + case sf::Event::KeyPressed: + { + switch (ev.key.code) + { + case sf::Keyboard::Up: + { + currentMenu->moveUp(); + break; + } + case sf::Keyboard::Down: + { + currentMenu->moveDown(); + break; + } + case sf::Keyboard::Enter: + { + int menuResult = currentMenu->chooseTile(currentMenu, player, window, ani); + // if 0, do nothing + if (menuResult == 1) { + state = STATE::MENU; + } + + else if (menuResult == 2) { + main_camera.setCenter(player.getPosition()); + main_camera.setSize(640, 360); + state = STATE::PLAYING; + } + else if (menuResult == 3) { + state = STATE::GAMEOVER; + } + break; + } + case sf::Keyboard::BackSpace: + { + currentMenu = std::make_shared(window.getSize().x, window.getSize().y, player); + break; + } + } + } + } + } + } + + + + + case STATE::PLAYING: + { + Event ev; + while (window.pollEvent(ev)) + { + switch (ev.type) + { + case Event::Closed: + { + window.close(); + break; + } + + } + + if (ev.type == Event::KeyPressed && ev.key.code == sf::Keyboard::Space) + { + player.canJump = false; + + if (!player.checkDead() && player.jumpCount < 2) + { + player.setVelocity(sf::Vector2f(player.getVelocity().x, -9)); + player.jumpCount++; + } + } + + + else if (ev.type == Event::KeyPressed && ev.key.code == sf::Keyboard::K && !player.checkDead()) + { + player.setVelocity(sf::Vector2f(0, player.getVelocity().y)); + //player.fight(enemy.get()); + if (player.fight(enemy.get())) + { + if (player.getPosition().x < enemy.get()->getPosition().x) + { + enemy.get()->setVelocity(sf::Vector2f(player.getVelocity().x + 4, -4)); + } + else + { + enemy.get()->setVelocity(sf::Vector2f(player.getVelocity().x - 4, -4)); + } + + } + std::cout << "health enemÿ: " << enemy.get()->health.current << "\n"; + + } + } + if (Keyboard::isKeyPressed(Keyboard::O)) + { + state = STATE::MENU; + currentMenu = std::make_shared(window.getSize().x, window.getSize().y, player); + + } + + if (Keyboard::isKeyPressed(Keyboard::Escape)) + { + //window.close(); + state = STATE::MENU; + currentMenu = std::make_shared(window.getSize().x, window.getSize().y, player); + } + + + if (sf::Keyboard::isKeyPressed(sf::Keyboard::D) && !player.checkDead()) + { + if (player.getCurrentAnimation() != std::string("WALKright")) { + player.setAnimation("WALKright", Animation::intervals::walk); + player.setTexture(player.currentAnimation.nextFrame()); + } + geluidje.playSound("footStep"); + player.setScale(sf::Vector2f(0.2, 0.2)); + player.setVelocity(sf::Vector2f(4, player.getVelocity().y)); + + } + else if (sf::Keyboard::isKeyPressed(sf::Keyboard::A) && !player.checkDead()) + { + if (player.getCurrentAnimation() != std::string("WALKright")) { + player.setAnimation("WALKright", Animation::intervals::walk); + player.setTexture(player.currentAnimation.nextFrame()); + + } + player.setScale(sf::Vector2f(-0.2, 0.2)); + + player.setVelocity(sf::Vector2f(-4, player.getVelocity().y)); + + } + + else if (player.currentAnimation.isDone() || player.getCurrentAnimation() == std::string("WALKright")) + { + player.setVelocity(sf::Vector2f(0, player.getVelocity().y)); + if (player.getVelocity().y == 0) { + if (player.getCurrentAnimation() != std::string("IDLEright") && player.getCurrentAnimation() != std::string("DYINGright")) { + player.setAnimation("IDLEright", Animation::intervals::idle); + player.setTexture(player.currentAnimation.nextFrame()); + } + } + } + + if (ev.type == sf::Event::KeyReleased) { + if (ev.key.code == sf::Keyboard::W && !player.checkDead()) { + np->updateText(); + } + } + + if (ev.type == sf::Event::MouseButtonReleased) { + if (ev.key.code == sf::Mouse::Left && !player.checkDead()) { + sf::Vector2i i = sf::Mouse::getPosition(window); + sf::Vector2f conf = window.mapPixelToCoords(i, main_camera); + std::shared_ptr prj = player.shootProjectile(conf); + projectiles.push_back(prj); + + } + } + + if (!enemy.get()->checkDead()) { + + ai->shouldFollow_followDirection(enemy.get(), &player); + if (aiClock.getElapsedTime().asMilliseconds() >= 300) + { + if (!enemy.get()->checkDead()) + { + ai->shouldFollow_followDirection(enemy.get(), &player); + } + aiClock.restart(); + } + + break; + } + } + + } +} + +void Game::update() { + + switch (state) + { + case STATE::MENU: + { + break; + } + + case STATE::PLAYING: + { + ai->walkRandomly(np.get()); + + if (player.updateAnimation()) + { + player.setTexture(player.currentAnimation.getCurrentFrame()); + } + if (enemy->updateAnimation()) + { + enemy->setTexture(enemy->currentAnimation.getCurrentFrame()); + } + if (np->updateAnimation()) + { + np->setTexture(np->currentAnimation.getCurrentFrame()); + } + + world_physics.step_x_moveables(); + world_physics.step_y_moveables(); + lvls.check_interaction(player,window); + + np->showText(player); + hud.update(); + + + std::shared_ptr tobedeleted; + + for (auto prj : projectiles) { + if (prj->isDeath()) { + tobedeleted = prj; + } + prj->updateLive(1); + prj->setTexture(prj->currentAnimation.nextFrame()); + prj->move(); + } + projectiles.erase(std::remove(projectiles.begin(), projectiles.end(), tobedeleted), projectiles.end()); + + np->showText(player); + hud.update(); + + + enemy->update_info_pos(window); + if (player.checkDead()) { + player.die(); + } + if (enemy.get()->checkDead()) { + enemy.get()->die(); + } + if (player.getPosition().y > 30000) { + player.respawn(); + player.setVelocity(sf::Vector2f(0, 0)); + + } + + } + break; + + } +} + +void Game::render() { + switch (state) + { + + case STATE::MENU: + { + window.clear(); + currentMenu->draw(window, lvls, enemy, main_camera, bgMain, player); + window.display(); + break; + } + + + case STATE::PLAYING: + { + window.clear(); + window.draw(lvls.background); + np->draw(window); + enemy->draw(window); + player.draw(window); + + + window.draw(lvls.ground); + window.draw(lvls.damage_background); + window.draw(lvls.foreground_bounce); + for (auto prj : projectiles) { + prj->draw(window); + } + window.draw(lvls.end); + + window.setView(main_HUD); + hud.draw(window); + auto center = Collision::GetSpriteCenter(player); + main_camera.setCenter(center); + window.setView(main_camera); + window.display(); + break; + } + } + return; +} \ No newline at end of file diff --git a/Adam/Game.hpp b/Adam/Game.hpp new file mode 100644 index 0000000..4f88752 --- /dev/null +++ b/Adam/Game.hpp @@ -0,0 +1,88 @@ +#ifndef _GAME_HPP +#define _GAME_HPP + +#include "Collision.h" +#include "Character.h" +#include "Movable.h" +#include "projectile.hpp" +#include "mainMenu.hpp" +//#include "statistic.h" +#include "physics.h" +#include "HUD.hpp" + +#include "AnimationManager.h" + +#include "menu.hpp" +#include "newGameMenu.hpp" +#include "Enemy.hpp" +#include "ingameMenu.hpp" +#include "AI.hpp" +#include "fighter.h" +#include "levelManager.h" +#include "Audio.hpp" + +using namespace std; +using namespace sf; + +#define v2i sf::Vector2i +#define v2 sf::Vector2f + +class Game { +private: + std::vector enemies; + sf::RenderWindow & window; + HUD & hud; + levelManager lvls; + sf::View main_camera; + + sf::View main_HUD; + + sf::Texture char_alpha; + sf::Texture char_alpha_invert; + sf::Texture menuTex; + Character & player; + Audio & geluidje; + + sf::Sprite bgMain; + int bounce_velocity = 1; + sf::Clock Clock; + sf::Clock aiClock; + + + Adam::collision_handler cln_h; + + Adam::physics world_physics; + + std::shared_ptr enemy; + + std::shared_ptr np; + + std::vector> projectiles; + sf::Texture tex; + + std::shared_ptr ai; + + + std::shared_ptr currentMenu; + AnimationManager & ani; + enum class STATE { MENU, PLAYING, GAMEOVER }; + enum STATE state; + +public: + + Game(sf::RenderWindow &w, Character &player, HUD &hud, AnimationManager & ani, Audio & geluidje); + + void handleInput(); + void update(); + void render(); + sf::RenderWindow & getWindow() { + return window; + } + + + +}; + + + +#endif _GAME_HPP diff --git a/Adam/HUD.cpp b/Adam/HUD.cpp new file mode 100644 index 0000000..d086bf5 --- /dev/null +++ b/Adam/HUD.cpp @@ -0,0 +1,74 @@ +#include "pch.h" +#include "HUD.hpp" +HUD::HUD(Character & character) : character(character) +{ + if (!font.loadFromFile("fonts/stranger.ttf")) + { + //std::cout << "error loading font" << std::endl; + } + + update(); + + for (unsigned int i = 0; i < 4; i++) + { + text[i].setFont(font); + text[i].setOutlineColor(sf::Color::Black); + text[i].setOutlineThickness(2.0f); + text[i].setCharacterSize(28); + if (!texture_bar[i].loadFromFile(bar_location[i])) + { + std::cout << "error loading font" << std::endl; + } + sprite_bar[i].setTexture(texture_bar[i]); + sprite_bar[i].setPosition(sf::Vector2f(10, 820 + 30 * i)); + bar_status(i); + } + + text[0].setFillColor(sf::Color::Red); + text[1].setFillColor(sf::Color::Blue); + text[2].setFillColor(sf::Color::Yellow); + text[3].setFillColor(sf::Color::White); +} + +void HUD::update() +{ + bar_length[0] = int((100.0 / (float)character.health.max) * (float)character.health.current); + bar_length[1]= int((100.0 / (float)character.mana.max) * (float)character.mana.current); + bar_length[2] = int((100.0 / (float)character.exp.max) * (float)character.exp.current); + + text[0].setString(std::to_string(character.health.current) + "/" + std::to_string(character.health.max) + '\n'); + text[1].setString(std::to_string(character.mana.current) + "/" + std::to_string(character.mana.max) + '\n'); + text[2].setString(std::to_string(character.exp.current) + "/" + std::to_string(character.exp.max) + '\n'); + text[3].setString(" lvl: " + std::to_string(character.lvl)); + for (unsigned int k = 0; k < 4; k++) + { + bar_status(k); + } + +} + +void HUD::bar_status(int index) +{ + if (index < 3) + { + sprite_bar[index].setScale(sf::Vector2f(1.45f, 1.45f)); + sprite_bar[index].setTextureRect(sf::IntRect(50, 70, bar_length[index], 60)); + text[index].setPosition(50, 813 + 30 * index); + } + else if (index == 3) + { + sprite_bar[3].setScale(sf::Vector2f(0.9f, 0.9f)); + sprite_bar[3].setTextureRect(sf::IntRect(50, 70, bar_length[3], 26)); + text[3].setPosition(20, 813 + 30 * 3); + } +} + +void HUD::draw(sf::RenderWindow & window) +{ + for (unsigned int j = 0; j < 4; j++) + { + window.draw(sprite_bar[j]); + window.draw(text[j]); + } + +} diff --git a/Adam/HUD.hpp b/Adam/HUD.hpp new file mode 100644 index 0000000..54e9ed6 --- /dev/null +++ b/Adam/HUD.hpp @@ -0,0 +1,51 @@ +#ifndef HUD_HPP +#define HUD_HPP + +#include "Character.h" +///@file + +/// \brief +/// HUD +/// \details +/// The HUD shows the status of the player: health, mana, experience, lvl. +class HUD +{ +private: + sf::Font font; + sf::Texture bar; + sf::Text text[4]; + sf::Texture texture_bar[4]; + sf::Sprite sprite_bar[4]; + std::string bar_location[4] = { "assets/Health.png","assets/Mana.png","assets/exp.png","assets/lvl.png" }; + Character & character; + int bar_length[4] = {100,100,100,60}; +public: + + /// \brief + /// constructor + /// \details + /// The constructor initialize a Character(player). + /// The standard values of the character are set. + HUD(Character & character); + + /// \brief + /// updates HUD info + /// \details + /// Updates the current & max value of each stat on the HUD. + /// Calls bar_satus function for each stat on the HUD. + void update(); + + /// \brief + /// bar length + /// \details + /// Sets the scale, texture and position of the bar of a stat based on the max & current value. + void bar_status(int index); + + /// \brief + /// show info on HUD + /// \details + /// Draws for each stat the text & bar. + void draw(sf::RenderWindow & window); +}; +#endif // !HUD_HPP + diff --git a/Adam/Menu.hpp b/Adam/Menu.hpp new file mode 100644 index 0000000..cc85f37 --- /dev/null +++ b/Adam/Menu.hpp @@ -0,0 +1,49 @@ +#ifndef MENU_HPP +#define MENU_HPP + +#include "Character.h" +#include "AnimationManager.h" +#include "levelManager.h" +#include "Enemy.hpp" + +class Menu { +private: + enum class menu_states { MAIN, NEWGAME, INGAME }; + enum menu_states menu_states = menu_states::MAIN; + //static bool gameStarted; +public: + int selectedItem; + + + + //enum menu_states {s_newGameMenu, s_mainMenu, s_ingameMenu}; + //menu_states current_state; + + virtual void draw(sf::RenderWindow & window, sf::View & main_camera, sf::Sprite & bgMain, Character & player) {} + virtual void draw(sf::RenderWindow & window, levelManager & lvls, std::shared_ptr & enemy) {} + virtual void draw(sf::RenderWindow & window, levelManager & lvls, std::shared_ptr & enemy, sf::View & main_camera, sf::Sprite & bgMain, Character & player) { + if (menu_states == menu_states::INGAME) { + draw(window, lvls, enemy); + } + else { + draw(window, main_camera, bgMain, player); + } + } + virtual void moveUp() = 0; + virtual void moveDown() = 0; + virtual int chooseTile(std::shared_ptr & currentMenu, Character & player, sf::Window & window, AnimationManager & ani) = 0; + + void setInGame() { + menu_states = menu_states::INGAME; + } + void setMain() { + menu_states = menu_states::MAIN; + } + void setNewGame() { + menu_states = menu_states::NEWGAME; + } + +}; + + +#endif diff --git a/Adam/Movable.cpp b/Adam/Movable.cpp new file mode 100644 index 0000000..7e2d7e1 --- /dev/null +++ b/Adam/Movable.cpp @@ -0,0 +1,41 @@ +#include "pch.h" +#include "Movable.h" + +movable::movable(sf::Vector2f &position, sf::Vector2f scale, const std::string &textureFile, sf::Vector2f velocity) : + drawable(position, scale, textureFile), + velocity(velocity) +{ +} + +movable::movable(sf::Vector2f &position, sf::Vector2f scale, sf::Texture texture, sf::Vector2f velocity): + drawable(position, scale, texture), + velocity(velocity) +{ +} + + +void movable::setVelocity(sf::Vector2f newVel) { + velocity = newVel; +} +sf::Vector2f movable::getVelocity() { + return velocity; +} +void movable::move(sf::Vector2f direction) { + position += direction; + sprite.setPosition(position); +} +void movable::move() { + position += velocity; + sprite.setPosition(position); +} + +void movable::setScale(sf::Vector2f scale) +{ + if (scale.x < 0) { + sprite.setOrigin(texture.getSize().x, 0); + } + else { + sprite.setOrigin(sf::Vector2f(0, 0)); + } + sprite.setScale(scale); +} diff --git a/Adam/Movable.h b/Adam/Movable.h new file mode 100644 index 0000000..5d67d45 --- /dev/null +++ b/Adam/Movable.h @@ -0,0 +1,25 @@ +#pragma once +#include "Drawable.h" + +class movable : public drawable { +protected: + sf::Vector2f velocity; + +public: + bool canJump = true; + int jumpCount = 0; + + enum class direction { LEFT, RIGHT }; + direction current_direction = direction::RIGHT; + movable(sf::Vector2f &position, sf::Vector2f scale, sf::Texture texture, sf::Vector2f velocity); + movable(sf::Vector2f &position, sf::Vector2f scale, const std::string &textureFile, sf::Vector2f velocity); + + movable() {} + virtual void setVelocity(sf::Vector2f newVel); + sf::Vector2f getVelocity(); + void move(sf::Vector2f direction); + void move(); + void setScale(sf::Vector2f scale); + + +}; \ No newline at end of file diff --git a/Adam/assets/AABB.png b/Adam/assets/AABB.png new file mode 100644 index 0000000..b4f390d Binary files /dev/null and b/Adam/assets/AABB.png differ diff --git a/Adam/assets/AABB_H.png b/Adam/assets/AABB_H.png new file mode 100644 index 0000000..c1ff8b5 Binary files /dev/null and b/Adam/assets/AABB_H.png differ diff --git a/Adam/assets/Health.png b/Adam/assets/Health.png new file mode 100644 index 0000000..18d1fb4 Binary files /dev/null and b/Adam/assets/Health.png differ diff --git a/Adam/assets/Mana.png b/Adam/assets/Mana.png new file mode 100644 index 0000000..23bad89 Binary files /dev/null and b/Adam/assets/Mana.png differ diff --git a/Adam/assets/Portrait/gunwomanPORTRAIT/gunwomanPORTRAITleft.png b/Adam/assets/Portrait/gunwomanPORTRAIT/gunwomanPORTRAITleft.png new file mode 100644 index 0000000..79191de Binary files /dev/null and b/Adam/assets/Portrait/gunwomanPORTRAIT/gunwomanPORTRAITleft.png differ diff --git a/Adam/assets/Portrait/gunwomanPORTRAIT/gunwomanPORTRAITright.png b/Adam/assets/Portrait/gunwomanPORTRAIT/gunwomanPORTRAITright.png new file mode 100644 index 0000000..856f954 Binary files /dev/null and b/Adam/assets/Portrait/gunwomanPORTRAIT/gunwomanPORTRAITright.png differ diff --git a/Adam/assets/Portrait/knightPORTRAIT/knightPORTRAITleft.png b/Adam/assets/Portrait/knightPORTRAIT/knightPORTRAITleft.png new file mode 100644 index 0000000..3030e59 Binary files /dev/null and b/Adam/assets/Portrait/knightPORTRAIT/knightPORTRAITleft.png differ diff --git a/Adam/assets/Portrait/knightPORTRAIT/knightPORTRAITright.png b/Adam/assets/Portrait/knightPORTRAIT/knightPORTRAITright.png new file mode 100644 index 0000000..0057441 Binary files /dev/null and b/Adam/assets/Portrait/knightPORTRAIT/knightPORTRAITright.png differ diff --git a/Adam/assets/Portrait/magePORTRAIT/magePORTRAITleft.png b/Adam/assets/Portrait/magePORTRAIT/magePORTRAITleft.png new file mode 100644 index 0000000..f57f80e Binary files /dev/null and b/Adam/assets/Portrait/magePORTRAIT/magePORTRAITleft.png differ diff --git a/Adam/assets/Portrait/magePORTRAIT/magePORTRAITright.png b/Adam/assets/Portrait/magePORTRAIT/magePORTRAITright.png new file mode 100644 index 0000000..3a8b0ea Binary files /dev/null and b/Adam/assets/Portrait/magePORTRAIT/magePORTRAITright.png differ diff --git a/Adam/assets/animations/animations.txt b/Adam/assets/animations/animations.txt new file mode 100644 index 0000000..73af6ae --- /dev/null +++ b/Adam/assets/animations/animations.txt @@ -0,0 +1,291 @@ +boy IDLEright animations/boyIDLEright/Idle_000.png +boy IDLEright animations/boyIDLEright/Idle_001.png +boy IDLEright animations/boyIDLEright/Idle_002.png +boy IDLEright animations/boyIDLEright/Idle_003.png +boy IDLEright animations/boyIDLEright/Idle_004.png +boy IDLEright animations/boyIDLEright/Idle_005.png +boy IDLEright animations/boyIDLEright/Idle_006.png +boy IDLEright animations/boyIDLEright/Idle_007.png +boy IDLEright animations/boyIDLEright/Idle_008.png +boy IDLEright animations/boyIDLEright/Idle_009.png +boy IDLEright animations/boyIDLEright/Idle_010.png +boy IDLEright animations/boyIDLEright/Idle_011.png +boy WALKright animations/boyWALKright/Walking_000.png +boy WALKright animations/boyWALKright/Walking_001.png +boy WALKright animations/boyWALKright/Walking_002.png +boy WALKright animations/boyWALKright/Walking_003.png +boy WALKright animations/boyWALKright/Walking_004.png +boy WALKright animations/boyWALKright/Walking_005.png +boy WALKright animations/boyWALKright/Walking_006.png +boy WALKright animations/boyWALKright/Walking_007.png +boy WALKright animations/boyWALKright/Walking_008.png +boy WALKright animations/boyWALKright/Walking_009.png +boy WALKright animations/boyWALKright/Walking_010.png +boy WALKright animations/boyWALKright/Walking_011.png +knight DYINGright animations/knightDYINGright/Dying_000.png +knight DYINGright animations/knightDYINGright/Dying_001.png +knight DYINGright animations/knightDYINGright/Dying_002.png +knight DYINGright animations/knightDYINGright/Dying_003.png +knight DYINGright animations/knightDYINGright/Dying_004.png +knight DYINGright animations/knightDYINGright/Dying_005.png +knight DYINGright animations/knightDYINGright/Dying_006.png +knight DYINGright animations/knightDYINGright/Dying_007.png +knight DYINGright animations/knightDYINGright/Dying_008.png +knight DYINGright animations/knightDYINGright/Dying_009.png +knight DYINGright animations/knightDYINGright/Dying_010.png +knight DYINGright animations/knightDYINGright/Dying_011.png +knight DYINGright animations/knightDYINGright/Dying_012.png +knight DYINGright animations/knightDYINGright/Dying_013.png +knight DYINGright animations/knightDYINGright/Dying_014.png +knight HURTright animations/knightHURTright/Hurt_000.png +knight HURTright animations/knightHURTright/Hurt_001.png +knight HURTright animations/knightHURTright/Hurt_002.png +knight HURTright animations/knightHURTright/Hurt_003.png +knight HURTright animations/knightHURTright/Hurt_004.png +knight HURTright animations/knightHURTright/Hurt_005.png +knight HURTright animations/knightHURTright/Hurt_006.png +knight HURTright animations/knightHURTright/Hurt_007.png +knight HURTright animations/knightHURTright/Hurt_008.png +knight HURTright animations/knightHURTright/Hurt_009.png +knight HURTright animations/knightHURTright/Hurt_010.png +knight HURTright animations/knightHURTright/Hurt_011.png +knight IDLEright animations/knightIDLEright/Idle_000.png +knight IDLEright animations/knightIDLEright/Idle_001.png +knight IDLEright animations/knightIDLEright/Idle_002.png +knight IDLEright animations/knightIDLEright/Idle_003.png +knight IDLEright animations/knightIDLEright/Idle_004.png +knight IDLEright animations/knightIDLEright/Idle_005.png +knight IDLEright animations/knightIDLEright/Idle_006.png +knight IDLEright animations/knightIDLEright/Idle_007.png +knight IDLEright animations/knightIDLEright/Idle_008.png +knight IDLEright animations/knightIDLEright/Idle_009.png +knight IDLEright animations/knightIDLEright/Idle_010.png +knight IDLEright animations/knightIDLEright/Idle_011.png +knight IDLEright animations/knightIDLEright/Idle_012.png +knight IDLEright animations/knightIDLEright/Idle_013.png +knight IDLEright animations/knightIDLEright/Idle_014.png +knight IDLEright animations/knightIDLEright/Idle_015.png +knight IDLEright animations/knightIDLEright/Idle_016.png +knight IDLEright animations/knightIDLEright/Idle_017.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_000.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_001.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_002.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_003.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_004.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_005.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_006.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_007.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_008.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_009.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_010.png +knight SLASHINGright animations/knightSLASHINGright/Slashing_011.png +knight WALKright animations/knightWALKright/Walking_000.png +knight WALKright animations/knightWALKright/Walking_001.png +knight WALKright animations/knightWALKright/Walking_002.png +knight WALKright animations/knightWALKright/Walking_003.png +knight WALKright animations/knightWALKright/Walking_004.png +knight WALKright animations/knightWALKright/Walking_005.png +knight WALKright animations/knightWALKright/Walking_006.png +knight WALKright animations/knightWALKright/Walking_007.png +knight WALKright animations/knightWALKright/Walking_008.png +knight WALKright animations/knightWALKright/Walking_009.png +knight WALKright animations/knightWALKright/Walking_010.png +knight WALKright animations/knightWALKright/Walking_011.png +knight WALKright animations/knightWALKright/Walking_012.png +knight WALKright animations/knightWALKright/Walking_013.png +knight WALKright animations/knightWALKright/Walking_014.png +knight WALKright animations/knightWALKright/Walking_015.png +knight WALKright animations/knightWALKright/Walking_016.png +knight WALKright animations/knightWALKright/Walking_017.png +knight WALKright animations/knightWALKright/Walking_018.png +knight WALKright animations/knightWALKright/Walking_019.png +knight WALKright animations/knightWALKright/Walking_020.png +knight WALKright animations/knightWALKright/Walking_021.png +knight WALKright animations/knightWALKright/Walking_022.png +knight WALKright animations/knightWALKright/Walking_023.png +mage DYINGright animations/mageDYINGright/Dying_000.png +mage DYINGright animations/mageDYINGright/Dying_001.png +mage DYINGright animations/mageDYINGright/Dying_002.png +mage DYINGright animations/mageDYINGright/Dying_003.png +mage DYINGright animations/mageDYINGright/Dying_004.png +mage DYINGright animations/mageDYINGright/Dying_005.png +mage DYINGright animations/mageDYINGright/Dying_006.png +mage DYINGright animations/mageDYINGright/Dying_007.png +mage DYINGright animations/mageDYINGright/Dying_008.png +mage DYINGright animations/mageDYINGright/Dying_009.png +mage DYINGright animations/mageDYINGright/Dying_010.png +mage DYINGright animations/mageDYINGright/Dying_011.png +mage DYINGright animations/mageDYINGright/Dying_012.png +mage DYINGright animations/mageDYINGright/Dying_013.png +mage DYINGright animations/mageDYINGright/Dying_014.png +mage HURTright animations/mageHURTright/Hurt_000.png +mage HURTright animations/mageHURTright/Hurt_001.png +mage HURTright animations/mageHURTright/Hurt_002.png +mage HURTright animations/mageHURTright/Hurt_003.png +mage HURTright animations/mageHURTright/Hurt_004.png +mage HURTright animations/mageHURTright/Hurt_005.png +mage HURTright animations/mageHURTright/Hurt_006.png +mage HURTright animations/mageHURTright/Hurt_007.png +mage HURTright animations/mageHURTright/Hurt_008.png +mage HURTright animations/mageHURTright/Hurt_009.png +mage HURTright animations/mageHURTright/Hurt_010.png +mage HURTright animations/mageHURTright/Hurt_011.png +mage IDLEright animations/mageIDLEright/Idle_000.png +mage IDLEright animations/mageIDLEright/Idle_001.png +mage IDLEright animations/mageIDLEright/Idle_002.png +mage IDLEright animations/mageIDLEright/Idle_003.png +mage IDLEright animations/mageIDLEright/Idle_004.png +mage IDLEright animations/mageIDLEright/Idle_005.png +mage IDLEright animations/mageIDLEright/Idle_006.png +mage IDLEright animations/mageIDLEright/Idle_007.png +mage IDLEright animations/mageIDLEright/Idle_008.png +mage IDLEright animations/mageIDLEright/Idle_009.png +mage IDLEright animations/mageIDLEright/Idle_010.png +mage IDLEright animations/mageIDLEright/Idle_011.png +mage IDLEright animations/mageIDLEright/Idle_012.png +mage IDLEright animations/mageIDLEright/Idle_013.png +mage IDLEright animations/mageIDLEright/Idle_014.png +mage IDLEright animations/mageIDLEright/Idle_015.png +mage IDLEright animations/mageIDLEright/Idle_016.png +mage IDLEright animations/mageIDLEright/Idle_017.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_000.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_001.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_002.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_003.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_004.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_005.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_006.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_007.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_008.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_009.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_010.png +mage SLASHINGright animations/mageSLASHINGright/Slashing_011.png +mage WALKright animations/mageWALKright/Walking_000.png +mage WALKright animations/mageWALKright/Walking_001.png +mage WALKright animations/mageWALKright/Walking_002.png +mage WALKright animations/mageWALKright/Walking_003.png +mage WALKright animations/mageWALKright/Walking_004.png +mage WALKright animations/mageWALKright/Walking_005.png +mage WALKright animations/mageWALKright/Walking_006.png +mage WALKright animations/mageWALKright/Walking_007.png +mage WALKright animations/mageWALKright/Walking_008.png +mage WALKright animations/mageWALKright/Walking_009.png +mage WALKright animations/mageWALKright/Walking_010.png +mage WALKright animations/mageWALKright/Walking_011.png +mage WALKright animations/mageWALKright/Walking_012.png +mage WALKright animations/mageWALKright/Walking_013.png +mage WALKright animations/mageWALKright/Walking_014.png +mage WALKright animations/mageWALKright/Walking_015.png +mage WALKright animations/mageWALKright/Walking_016.png +mage WALKright animations/mageWALKright/Walking_017.png +mage WALKright animations/mageWALKright/Walking_018.png +mage WALKright animations/mageWALKright/Walking_019.png +mage WALKright animations/mageWALKright/Walking_020.png +mage WALKright animations/mageWALKright/Walking_021.png +mage WALKright animations/mageWALKright/Walking_022.png +mage WALKright animations/mageWALKright/Walking_023.png +projectile AXEright animations/projectileAXEright/Axe_001.png +projectile AXEright animations/projectileAXEright/Axe_002.png +projectile AXEright animations/projectileAXEright/Axe_003.png +projectile AXEright animations/projectileAXEright/Axe_004.png +projectile AXEright animations/projectileAXEright/Axe_005.png +projectile AXEright animations/projectileAXEright/Axe_006.png +projectile AXEright animations/projectileAXEright/Axe_007.png +projectile AXEright animations/projectileAXEright/Axe_008.png +projectile AXEright animations/projectileAXEright/Axe_009.png +projectile AXEright animations/projectileAXEright/Axe_010.png +projectile AXEright animations/projectileAXEright/Axe_011.png +projectile AXEright animations/projectileAXEright/Axe_012.png +projectile AXEright animations/projectileAXEright/Axe_013.png +projectile AXEright animations/projectileAXEright/Axe_014.png +projectile AXEright animations/projectileAXEright/Axe_015.png +projectile AXEright animations/projectileAXEright/Axe_016.png +projectile AXEright animations/projectileAXEright/Axe_017.png +projectile FIREBALLright animations/projectileFIREBALLright/Fireball_001.png +projectile FIREBALLright animations/projectileFIREBALLright/Fireball_002.png +projectile FIREBALLright animations/projectileFIREBALLright/Fireball_003.png +projectile FIREBALLright animations/projectileFIREBALLright/Fireball_004.png +projectile FIREBALLright animations/projectileFIREBALLright/Fireball_005.png +projectile FIREBALLright animations/projectileFIREBALLright/Fireball_006.png +projectile FIREBALLright animations/projectileFIREBALLright/Fireball_007.png +skull DYINGright animations/skullDYINGright/Dying_000.png +skull DYINGright animations/skullDYINGright/Dying_001.png +skull DYINGright animations/skullDYINGright/Dying_002.png +skull DYINGright animations/skullDYINGright/Dying_003.png +skull DYINGright animations/skullDYINGright/Dying_004.png +skull DYINGright animations/skullDYINGright/Dying_005.png +skull DYINGright animations/skullDYINGright/Dying_006.png +skull DYINGright animations/skullDYINGright/Dying_007.png +skull DYINGright animations/skullDYINGright/Dying_008.png +skull DYINGright animations/skullDYINGright/Dying_009.png +skull DYINGright animations/skullDYINGright/Dying_010.png +skull DYINGright animations/skullDYINGright/Dying_011.png +skull DYINGright animations/skullDYINGright/Dying_012.png +skull DYINGright animations/skullDYINGright/Dying_013.png +skull DYINGright animations/skullDYINGright/Dying_014.png +skull HURTright animations/skullHURTright/Hurt_000.png +skull HURTright animations/skullHURTright/Hurt_001.png +skull HURTright animations/skullHURTright/Hurt_002.png +skull HURTright animations/skullHURTright/Hurt_003.png +skull HURTright animations/skullHURTright/Hurt_004.png +skull HURTright animations/skullHURTright/Hurt_005.png +skull HURTright animations/skullHURTright/Hurt_006.png +skull HURTright animations/skullHURTright/Hurt_007.png +skull HURTright animations/skullHURTright/Hurt_008.png +skull HURTright animations/skullHURTright/Hurt_009.png +skull HURTright animations/skullHURTright/Hurt_010.png +skull HURTright animations/skullHURTright/Hurt_011.png +skull IDLEright animations/skullIDLEright/Idle_000.png +skull IDLEright animations/skullIDLEright/Idle_001.png +skull IDLEright animations/skullIDLEright/Idle_002.png +skull IDLEright animations/skullIDLEright/Idle_003.png +skull IDLEright animations/skullIDLEright/Idle_004.png +skull IDLEright animations/skullIDLEright/Idle_005.png +skull IDLEright animations/skullIDLEright/Idle_006.png +skull IDLEright animations/skullIDLEright/Idle_007.png +skull IDLEright animations/skullIDLEright/Idle_008.png +skull IDLEright animations/skullIDLEright/Idle_009.png +skull IDLEright animations/skullIDLEright/Idle_010.png +skull IDLEright animations/skullIDLEright/Idle_011.png +skull IDLEright animations/skullIDLEright/Idle_012.png +skull IDLEright animations/skullIDLEright/Idle_013.png +skull IDLEright animations/skullIDLEright/Idle_014.png +skull IDLEright animations/skullIDLEright/Idle_015.png +skull IDLEright animations/skullIDLEright/Idle_016.png +skull IDLEright animations/skullIDLEright/Idle_017.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_000.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_001.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_002.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_003.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_004.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_005.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_006.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_007.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_008.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_009.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_010.png +skull SLASHINGright animations/skullSLASHINGright/Slashing_011.png +skull WALKright animations/skullWALKright/Walking_000.png +skull WALKright animations/skullWALKright/Walking_001.png +skull WALKright animations/skullWALKright/Walking_002.png +skull WALKright animations/skullWALKright/Walking_003.png +skull WALKright animations/skullWALKright/Walking_004.png +skull WALKright animations/skullWALKright/Walking_005.png +skull WALKright animations/skullWALKright/Walking_006.png +skull WALKright animations/skullWALKright/Walking_007.png +skull WALKright animations/skullWALKright/Walking_008.png +skull WALKright animations/skullWALKright/Walking_009.png +skull WALKright animations/skullWALKright/Walking_010.png +skull WALKright animations/skullWALKright/Walking_011.png +skull WALKright animations/skullWALKright/Walking_012.png +skull WALKright animations/skullWALKright/Walking_013.png +skull WALKright animations/skullWALKright/Walking_014.png +skull WALKright animations/skullWALKright/Walking_015.png +skull WALKright animations/skullWALKright/Walking_016.png +skull WALKright animations/skullWALKright/Walking_017.png +skull WALKright animations/skullWALKright/Walking_018.png +skull WALKright animations/skullWALKright/Walking_019.png +skull WALKright animations/skullWALKright/Walking_020.png +skull WALKright animations/skullWALKright/Walking_021.png +skull WALKright animations/skullWALKright/Walking_022.png +skull WALKright animations/skullWALKright/Walking_023.png diff --git a/Adam/assets/animations/boyIDLEright/Idle_000.png b/Adam/assets/animations/boyIDLEright/Idle_000.png new file mode 100644 index 0000000..dfd7ee7 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_000.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_001.png b/Adam/assets/animations/boyIDLEright/Idle_001.png new file mode 100644 index 0000000..730c0a4 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_001.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_002.png b/Adam/assets/animations/boyIDLEright/Idle_002.png new file mode 100644 index 0000000..c3f676d Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_002.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_003.png b/Adam/assets/animations/boyIDLEright/Idle_003.png new file mode 100644 index 0000000..f55bb23 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_003.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_004.png b/Adam/assets/animations/boyIDLEright/Idle_004.png new file mode 100644 index 0000000..9935808 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_004.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_005.png b/Adam/assets/animations/boyIDLEright/Idle_005.png new file mode 100644 index 0000000..c7698a8 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_005.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_006.png b/Adam/assets/animations/boyIDLEright/Idle_006.png new file mode 100644 index 0000000..0f70fae Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_006.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_007.png b/Adam/assets/animations/boyIDLEright/Idle_007.png new file mode 100644 index 0000000..401a010 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_007.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_008.png b/Adam/assets/animations/boyIDLEright/Idle_008.png new file mode 100644 index 0000000..1fb5113 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_008.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_009.png b/Adam/assets/animations/boyIDLEright/Idle_009.png new file mode 100644 index 0000000..8e5f6c5 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_009.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_010.png b/Adam/assets/animations/boyIDLEright/Idle_010.png new file mode 100644 index 0000000..41f1436 Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_010.png differ diff --git a/Adam/assets/animations/boyIDLEright/Idle_011.png b/Adam/assets/animations/boyIDLEright/Idle_011.png new file mode 100644 index 0000000..ce5400a Binary files /dev/null and b/Adam/assets/animations/boyIDLEright/Idle_011.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_000.png b/Adam/assets/animations/boyWALKright/Walking_000.png new file mode 100644 index 0000000..dfd7ee7 Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_000.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_001.png b/Adam/assets/animations/boyWALKright/Walking_001.png new file mode 100644 index 0000000..dbedfcf Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_001.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_002.png b/Adam/assets/animations/boyWALKright/Walking_002.png new file mode 100644 index 0000000..652030f Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_002.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_003.png b/Adam/assets/animations/boyWALKright/Walking_003.png new file mode 100644 index 0000000..d5d2ef9 Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_003.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_004.png b/Adam/assets/animations/boyWALKright/Walking_004.png new file mode 100644 index 0000000..fe5965f Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_004.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_005.png b/Adam/assets/animations/boyWALKright/Walking_005.png new file mode 100644 index 0000000..f6f3ccc Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_005.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_006.png b/Adam/assets/animations/boyWALKright/Walking_006.png new file mode 100644 index 0000000..65a4a29 Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_006.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_007.png b/Adam/assets/animations/boyWALKright/Walking_007.png new file mode 100644 index 0000000..fbd2e71 Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_007.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_008.png b/Adam/assets/animations/boyWALKright/Walking_008.png new file mode 100644 index 0000000..3738c2d Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_008.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_009.png b/Adam/assets/animations/boyWALKright/Walking_009.png new file mode 100644 index 0000000..82dea54 Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_009.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_010.png b/Adam/assets/animations/boyWALKright/Walking_010.png new file mode 100644 index 0000000..16ae6e3 Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_010.png differ diff --git a/Adam/assets/animations/boyWALKright/Walking_011.png b/Adam/assets/animations/boyWALKright/Walking_011.png new file mode 100644 index 0000000..b1bf9d2 Binary files /dev/null and b/Adam/assets/animations/boyWALKright/Walking_011.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_000.png b/Adam/assets/animations/knightDYINGright/Dying_000.png new file mode 100644 index 0000000..eea2657 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_000.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_001.png b/Adam/assets/animations/knightDYINGright/Dying_001.png new file mode 100644 index 0000000..8b9ea04 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_001.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_002.png b/Adam/assets/animations/knightDYINGright/Dying_002.png new file mode 100644 index 0000000..1b59f2e Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_002.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_003.png b/Adam/assets/animations/knightDYINGright/Dying_003.png new file mode 100644 index 0000000..f73c05a Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_003.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_004.png b/Adam/assets/animations/knightDYINGright/Dying_004.png new file mode 100644 index 0000000..e5e6eec Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_004.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_005.png b/Adam/assets/animations/knightDYINGright/Dying_005.png new file mode 100644 index 0000000..3741027 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_005.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_006.png b/Adam/assets/animations/knightDYINGright/Dying_006.png new file mode 100644 index 0000000..69b405f Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_006.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_007.png b/Adam/assets/animations/knightDYINGright/Dying_007.png new file mode 100644 index 0000000..e624854 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_007.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_008.png b/Adam/assets/animations/knightDYINGright/Dying_008.png new file mode 100644 index 0000000..e0ab4cd Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_008.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_009.png b/Adam/assets/animations/knightDYINGright/Dying_009.png new file mode 100644 index 0000000..897e52b Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_009.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_010.png b/Adam/assets/animations/knightDYINGright/Dying_010.png new file mode 100644 index 0000000..5c2d231 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_010.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_011.png b/Adam/assets/animations/knightDYINGright/Dying_011.png new file mode 100644 index 0000000..b2065f3 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_011.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_012.png b/Adam/assets/animations/knightDYINGright/Dying_012.png new file mode 100644 index 0000000..b2065f3 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_012.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_013.png b/Adam/assets/animations/knightDYINGright/Dying_013.png new file mode 100644 index 0000000..b2065f3 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_013.png differ diff --git a/Adam/assets/animations/knightDYINGright/Dying_014.png b/Adam/assets/animations/knightDYINGright/Dying_014.png new file mode 100644 index 0000000..b2065f3 Binary files /dev/null and b/Adam/assets/animations/knightDYINGright/Dying_014.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_000.png b/Adam/assets/animations/knightHURTright/Hurt_000.png new file mode 100644 index 0000000..eea2657 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_000.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_001.png b/Adam/assets/animations/knightHURTright/Hurt_001.png new file mode 100644 index 0000000..45bb964 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_001.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_002.png b/Adam/assets/animations/knightHURTright/Hurt_002.png new file mode 100644 index 0000000..f6a6aa2 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_002.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_003.png b/Adam/assets/animations/knightHURTright/Hurt_003.png new file mode 100644 index 0000000..39e917f Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_003.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_004.png b/Adam/assets/animations/knightHURTright/Hurt_004.png new file mode 100644 index 0000000..3d5ac2f Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_004.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_005.png b/Adam/assets/animations/knightHURTright/Hurt_005.png new file mode 100644 index 0000000..f062e06 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_005.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_006.png b/Adam/assets/animations/knightHURTright/Hurt_006.png new file mode 100644 index 0000000..93258c1 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_006.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_007.png b/Adam/assets/animations/knightHURTright/Hurt_007.png new file mode 100644 index 0000000..b0233d6 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_007.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_008.png b/Adam/assets/animations/knightHURTright/Hurt_008.png new file mode 100644 index 0000000..47a9d9b Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_008.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_009.png b/Adam/assets/animations/knightHURTright/Hurt_009.png new file mode 100644 index 0000000..4afcf35 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_009.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_010.png b/Adam/assets/animations/knightHURTright/Hurt_010.png new file mode 100644 index 0000000..660fef5 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_010.png differ diff --git a/Adam/assets/animations/knightHURTright/Hurt_011.png b/Adam/assets/animations/knightHURTright/Hurt_011.png new file mode 100644 index 0000000..7d749a5 Binary files /dev/null and b/Adam/assets/animations/knightHURTright/Hurt_011.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_000.png b/Adam/assets/animations/knightIDLEright/Idle_000.png new file mode 100644 index 0000000..60ddec1 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_000.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_001.png b/Adam/assets/animations/knightIDLEright/Idle_001.png new file mode 100644 index 0000000..526fdc9 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_001.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_002.png b/Adam/assets/animations/knightIDLEright/Idle_002.png new file mode 100644 index 0000000..a79aaea Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_002.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_003.png b/Adam/assets/animations/knightIDLEright/Idle_003.png new file mode 100644 index 0000000..fe5d68f Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_003.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_004.png b/Adam/assets/animations/knightIDLEright/Idle_004.png new file mode 100644 index 0000000..e016408 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_004.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_005.png b/Adam/assets/animations/knightIDLEright/Idle_005.png new file mode 100644 index 0000000..4340a38 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_005.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_006.png b/Adam/assets/animations/knightIDLEright/Idle_006.png new file mode 100644 index 0000000..492b5cc Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_006.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_007.png b/Adam/assets/animations/knightIDLEright/Idle_007.png new file mode 100644 index 0000000..ae7f58c Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_007.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_008.png b/Adam/assets/animations/knightIDLEright/Idle_008.png new file mode 100644 index 0000000..1cec2e1 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_008.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_009.png b/Adam/assets/animations/knightIDLEright/Idle_009.png new file mode 100644 index 0000000..674ded2 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_009.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_010.png b/Adam/assets/animations/knightIDLEright/Idle_010.png new file mode 100644 index 0000000..526ce9c Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_010.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_011.png b/Adam/assets/animations/knightIDLEright/Idle_011.png new file mode 100644 index 0000000..1d71c1c Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_011.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_012.png b/Adam/assets/animations/knightIDLEright/Idle_012.png new file mode 100644 index 0000000..e056dee Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_012.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_013.png b/Adam/assets/animations/knightIDLEright/Idle_013.png new file mode 100644 index 0000000..8734762 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_013.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_014.png b/Adam/assets/animations/knightIDLEright/Idle_014.png new file mode 100644 index 0000000..4b51072 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_014.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_015.png b/Adam/assets/animations/knightIDLEright/Idle_015.png new file mode 100644 index 0000000..9a81042 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_015.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_016.png b/Adam/assets/animations/knightIDLEright/Idle_016.png new file mode 100644 index 0000000..f20c353 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_016.png differ diff --git a/Adam/assets/animations/knightIDLEright/Idle_017.png b/Adam/assets/animations/knightIDLEright/Idle_017.png new file mode 100644 index 0000000..a1cd0b7 Binary files /dev/null and b/Adam/assets/animations/knightIDLEright/Idle_017.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_000.png b/Adam/assets/animations/knightSLASHINGright/Slashing_000.png new file mode 100644 index 0000000..67fc13c Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_000.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_001.png b/Adam/assets/animations/knightSLASHINGright/Slashing_001.png new file mode 100644 index 0000000..d4fe92e Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_001.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_002.png b/Adam/assets/animations/knightSLASHINGright/Slashing_002.png new file mode 100644 index 0000000..91c437a Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_002.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_003.png b/Adam/assets/animations/knightSLASHINGright/Slashing_003.png new file mode 100644 index 0000000..2749aad Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_003.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_004.png b/Adam/assets/animations/knightSLASHINGright/Slashing_004.png new file mode 100644 index 0000000..4759758 Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_004.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_005.png b/Adam/assets/animations/knightSLASHINGright/Slashing_005.png new file mode 100644 index 0000000..2cad056 Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_005.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_006.png b/Adam/assets/animations/knightSLASHINGright/Slashing_006.png new file mode 100644 index 0000000..d449e43 Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_006.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_007.png b/Adam/assets/animations/knightSLASHINGright/Slashing_007.png new file mode 100644 index 0000000..3ed5407 Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_007.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_008.png b/Adam/assets/animations/knightSLASHINGright/Slashing_008.png new file mode 100644 index 0000000..1a2400f Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_008.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_009.png b/Adam/assets/animations/knightSLASHINGright/Slashing_009.png new file mode 100644 index 0000000..425ae31 Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_009.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_010.png b/Adam/assets/animations/knightSLASHINGright/Slashing_010.png new file mode 100644 index 0000000..cf0f79a Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_010.png differ diff --git a/Adam/assets/animations/knightSLASHINGright/Slashing_011.png b/Adam/assets/animations/knightSLASHINGright/Slashing_011.png new file mode 100644 index 0000000..bef3510 Binary files /dev/null and b/Adam/assets/animations/knightSLASHINGright/Slashing_011.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_000.png b/Adam/assets/animations/knightWALKright/Walking_000.png new file mode 100644 index 0000000..e71df98 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_000.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_001.png b/Adam/assets/animations/knightWALKright/Walking_001.png new file mode 100644 index 0000000..283b96a Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_001.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_002.png b/Adam/assets/animations/knightWALKright/Walking_002.png new file mode 100644 index 0000000..87bf43d Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_002.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_003.png b/Adam/assets/animations/knightWALKright/Walking_003.png new file mode 100644 index 0000000..23f0d3d Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_003.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_004.png b/Adam/assets/animations/knightWALKright/Walking_004.png new file mode 100644 index 0000000..56338ef Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_004.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_005.png b/Adam/assets/animations/knightWALKright/Walking_005.png new file mode 100644 index 0000000..50fd2f2 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_005.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_006.png b/Adam/assets/animations/knightWALKright/Walking_006.png new file mode 100644 index 0000000..62eacf1 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_006.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_007.png b/Adam/assets/animations/knightWALKright/Walking_007.png new file mode 100644 index 0000000..6e77050 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_007.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_008.png b/Adam/assets/animations/knightWALKright/Walking_008.png new file mode 100644 index 0000000..4f2631e Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_008.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_009.png b/Adam/assets/animations/knightWALKright/Walking_009.png new file mode 100644 index 0000000..7d4be22 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_009.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_010.png b/Adam/assets/animations/knightWALKright/Walking_010.png new file mode 100644 index 0000000..8c06e3c Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_010.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_011.png b/Adam/assets/animations/knightWALKright/Walking_011.png new file mode 100644 index 0000000..9c061b9 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_011.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_012.png b/Adam/assets/animations/knightWALKright/Walking_012.png new file mode 100644 index 0000000..e274bec Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_012.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_013.png b/Adam/assets/animations/knightWALKright/Walking_013.png new file mode 100644 index 0000000..70d4b37 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_013.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_014.png b/Adam/assets/animations/knightWALKright/Walking_014.png new file mode 100644 index 0000000..6daf201 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_014.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_015.png b/Adam/assets/animations/knightWALKright/Walking_015.png new file mode 100644 index 0000000..1810143 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_015.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_016.png b/Adam/assets/animations/knightWALKright/Walking_016.png new file mode 100644 index 0000000..a4e3193 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_016.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_017.png b/Adam/assets/animations/knightWALKright/Walking_017.png new file mode 100644 index 0000000..04ad178 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_017.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_018.png b/Adam/assets/animations/knightWALKright/Walking_018.png new file mode 100644 index 0000000..7054d6f Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_018.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_019.png b/Adam/assets/animations/knightWALKright/Walking_019.png new file mode 100644 index 0000000..386448d Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_019.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_020.png b/Adam/assets/animations/knightWALKright/Walking_020.png new file mode 100644 index 0000000..9f8bec1 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_020.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_021.png b/Adam/assets/animations/knightWALKright/Walking_021.png new file mode 100644 index 0000000..51acb06 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_021.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_022.png b/Adam/assets/animations/knightWALKright/Walking_022.png new file mode 100644 index 0000000..d1bf98a Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_022.png differ diff --git a/Adam/assets/animations/knightWALKright/Walking_023.png b/Adam/assets/animations/knightWALKright/Walking_023.png new file mode 100644 index 0000000..9749824 Binary files /dev/null and b/Adam/assets/animations/knightWALKright/Walking_023.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_000.png b/Adam/assets/animations/mageDYINGright/Dying_000.png new file mode 100644 index 0000000..fea80d0 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_000.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_001.png b/Adam/assets/animations/mageDYINGright/Dying_001.png new file mode 100644 index 0000000..7c13318 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_001.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_002.png b/Adam/assets/animations/mageDYINGright/Dying_002.png new file mode 100644 index 0000000..46c4215 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_002.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_003.png b/Adam/assets/animations/mageDYINGright/Dying_003.png new file mode 100644 index 0000000..f78d636 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_003.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_004.png b/Adam/assets/animations/mageDYINGright/Dying_004.png new file mode 100644 index 0000000..292b886 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_004.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_005.png b/Adam/assets/animations/mageDYINGright/Dying_005.png new file mode 100644 index 0000000..d3f1855 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_005.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_006.png b/Adam/assets/animations/mageDYINGright/Dying_006.png new file mode 100644 index 0000000..d33a2de Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_006.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_007.png b/Adam/assets/animations/mageDYINGright/Dying_007.png new file mode 100644 index 0000000..d62d3f7 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_007.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_008.png b/Adam/assets/animations/mageDYINGright/Dying_008.png new file mode 100644 index 0000000..360c4a6 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_008.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_009.png b/Adam/assets/animations/mageDYINGright/Dying_009.png new file mode 100644 index 0000000..321959a Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_009.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_010.png b/Adam/assets/animations/mageDYINGright/Dying_010.png new file mode 100644 index 0000000..f6527c6 Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_010.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_011.png b/Adam/assets/animations/mageDYINGright/Dying_011.png new file mode 100644 index 0000000..44cd3cc Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_011.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_012.png b/Adam/assets/animations/mageDYINGright/Dying_012.png new file mode 100644 index 0000000..44cd3cc Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_012.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_013.png b/Adam/assets/animations/mageDYINGright/Dying_013.png new file mode 100644 index 0000000..44cd3cc Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_013.png differ diff --git a/Adam/assets/animations/mageDYINGright/Dying_014.png b/Adam/assets/animations/mageDYINGright/Dying_014.png new file mode 100644 index 0000000..44cd3cc Binary files /dev/null and b/Adam/assets/animations/mageDYINGright/Dying_014.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_000.png b/Adam/assets/animations/mageHURTright/Hurt_000.png new file mode 100644 index 0000000..fea80d0 Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_000.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_001.png b/Adam/assets/animations/mageHURTright/Hurt_001.png new file mode 100644 index 0000000..2dec2cb Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_001.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_002.png b/Adam/assets/animations/mageHURTright/Hurt_002.png new file mode 100644 index 0000000..a800e49 Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_002.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_003.png b/Adam/assets/animations/mageHURTright/Hurt_003.png new file mode 100644 index 0000000..4666f92 Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_003.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_004.png b/Adam/assets/animations/mageHURTright/Hurt_004.png new file mode 100644 index 0000000..3165e3e Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_004.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_005.png b/Adam/assets/animations/mageHURTright/Hurt_005.png new file mode 100644 index 0000000..7fcdeae Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_005.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_006.png b/Adam/assets/animations/mageHURTright/Hurt_006.png new file mode 100644 index 0000000..2cb4a8c Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_006.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_007.png b/Adam/assets/animations/mageHURTright/Hurt_007.png new file mode 100644 index 0000000..0ffbfdf Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_007.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_008.png b/Adam/assets/animations/mageHURTright/Hurt_008.png new file mode 100644 index 0000000..6301903 Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_008.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_009.png b/Adam/assets/animations/mageHURTright/Hurt_009.png new file mode 100644 index 0000000..80c92fb Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_009.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_010.png b/Adam/assets/animations/mageHURTright/Hurt_010.png new file mode 100644 index 0000000..c2a0a97 Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_010.png differ diff --git a/Adam/assets/animations/mageHURTright/Hurt_011.png b/Adam/assets/animations/mageHURTright/Hurt_011.png new file mode 100644 index 0000000..9f81fa4 Binary files /dev/null and b/Adam/assets/animations/mageHURTright/Hurt_011.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_000.png b/Adam/assets/animations/mageIDLEright/Idle_000.png new file mode 100644 index 0000000..03d5fb6 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_000.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_001.png b/Adam/assets/animations/mageIDLEright/Idle_001.png new file mode 100644 index 0000000..c073bc9 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_001.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_002.png b/Adam/assets/animations/mageIDLEright/Idle_002.png new file mode 100644 index 0000000..5db0eae Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_002.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_003.png b/Adam/assets/animations/mageIDLEright/Idle_003.png new file mode 100644 index 0000000..72c0b60 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_003.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_004.png b/Adam/assets/animations/mageIDLEright/Idle_004.png new file mode 100644 index 0000000..5f0cad4 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_004.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_005.png b/Adam/assets/animations/mageIDLEright/Idle_005.png new file mode 100644 index 0000000..a8a2994 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_005.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_006.png b/Adam/assets/animations/mageIDLEright/Idle_006.png new file mode 100644 index 0000000..6da0ef7 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_006.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_007.png b/Adam/assets/animations/mageIDLEright/Idle_007.png new file mode 100644 index 0000000..f5500f8 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_007.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_008.png b/Adam/assets/animations/mageIDLEright/Idle_008.png new file mode 100644 index 0000000..ce79d0d Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_008.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_009.png b/Adam/assets/animations/mageIDLEright/Idle_009.png new file mode 100644 index 0000000..bd37a02 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_009.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_010.png b/Adam/assets/animations/mageIDLEright/Idle_010.png new file mode 100644 index 0000000..84336ed Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_010.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_011.png b/Adam/assets/animations/mageIDLEright/Idle_011.png new file mode 100644 index 0000000..a850413 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_011.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_012.png b/Adam/assets/animations/mageIDLEright/Idle_012.png new file mode 100644 index 0000000..078e126 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_012.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_013.png b/Adam/assets/animations/mageIDLEright/Idle_013.png new file mode 100644 index 0000000..e056851 Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_013.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_014.png b/Adam/assets/animations/mageIDLEright/Idle_014.png new file mode 100644 index 0000000..914067e Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_014.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_015.png b/Adam/assets/animations/mageIDLEright/Idle_015.png new file mode 100644 index 0000000..8918b3c Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_015.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_016.png b/Adam/assets/animations/mageIDLEright/Idle_016.png new file mode 100644 index 0000000..ab4685e Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_016.png differ diff --git a/Adam/assets/animations/mageIDLEright/Idle_017.png b/Adam/assets/animations/mageIDLEright/Idle_017.png new file mode 100644 index 0000000..f9f9e6e Binary files /dev/null and b/Adam/assets/animations/mageIDLEright/Idle_017.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_000.png b/Adam/assets/animations/mageSLASHINGright/Slashing_000.png new file mode 100644 index 0000000..122afb3 Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_000.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_001.png b/Adam/assets/animations/mageSLASHINGright/Slashing_001.png new file mode 100644 index 0000000..2879b1e Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_001.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_002.png b/Adam/assets/animations/mageSLASHINGright/Slashing_002.png new file mode 100644 index 0000000..218b5a0 Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_002.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_003.png b/Adam/assets/animations/mageSLASHINGright/Slashing_003.png new file mode 100644 index 0000000..6a597e4 Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_003.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_004.png b/Adam/assets/animations/mageSLASHINGright/Slashing_004.png new file mode 100644 index 0000000..e202130 Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_004.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_005.png b/Adam/assets/animations/mageSLASHINGright/Slashing_005.png new file mode 100644 index 0000000..0a118dd Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_005.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_006.png b/Adam/assets/animations/mageSLASHINGright/Slashing_006.png new file mode 100644 index 0000000..13947f0 Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_006.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_007.png b/Adam/assets/animations/mageSLASHINGright/Slashing_007.png new file mode 100644 index 0000000..24500c8 Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_007.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_008.png b/Adam/assets/animations/mageSLASHINGright/Slashing_008.png new file mode 100644 index 0000000..fda401e Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_008.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_009.png b/Adam/assets/animations/mageSLASHINGright/Slashing_009.png new file mode 100644 index 0000000..4baa78e Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_009.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_010.png b/Adam/assets/animations/mageSLASHINGright/Slashing_010.png new file mode 100644 index 0000000..ba8bfce Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_010.png differ diff --git a/Adam/assets/animations/mageSLASHINGright/Slashing_011.png b/Adam/assets/animations/mageSLASHINGright/Slashing_011.png new file mode 100644 index 0000000..b92957c Binary files /dev/null and b/Adam/assets/animations/mageSLASHINGright/Slashing_011.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_000.png b/Adam/assets/animations/mageWALKright/Walking_000.png new file mode 100644 index 0000000..f37345d Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_000.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_001.png b/Adam/assets/animations/mageWALKright/Walking_001.png new file mode 100644 index 0000000..ab63b8e Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_001.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_002.png b/Adam/assets/animations/mageWALKright/Walking_002.png new file mode 100644 index 0000000..34423c3 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_002.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_003.png b/Adam/assets/animations/mageWALKright/Walking_003.png new file mode 100644 index 0000000..7207dd2 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_003.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_004.png b/Adam/assets/animations/mageWALKright/Walking_004.png new file mode 100644 index 0000000..98f90dd Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_004.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_005.png b/Adam/assets/animations/mageWALKright/Walking_005.png new file mode 100644 index 0000000..6caa799 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_005.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_006.png b/Adam/assets/animations/mageWALKright/Walking_006.png new file mode 100644 index 0000000..93edd92 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_006.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_007.png b/Adam/assets/animations/mageWALKright/Walking_007.png new file mode 100644 index 0000000..6f0e15b Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_007.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_008.png b/Adam/assets/animations/mageWALKright/Walking_008.png new file mode 100644 index 0000000..721a01b Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_008.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_009.png b/Adam/assets/animations/mageWALKright/Walking_009.png new file mode 100644 index 0000000..2ac4672 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_009.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_010.png b/Adam/assets/animations/mageWALKright/Walking_010.png new file mode 100644 index 0000000..617f01a Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_010.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_011.png b/Adam/assets/animations/mageWALKright/Walking_011.png new file mode 100644 index 0000000..8f40c55 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_011.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_012.png b/Adam/assets/animations/mageWALKright/Walking_012.png new file mode 100644 index 0000000..f1a0c7f Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_012.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_013.png b/Adam/assets/animations/mageWALKright/Walking_013.png new file mode 100644 index 0000000..2a95e94 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_013.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_014.png b/Adam/assets/animations/mageWALKright/Walking_014.png new file mode 100644 index 0000000..ff99121 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_014.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_015.png b/Adam/assets/animations/mageWALKright/Walking_015.png new file mode 100644 index 0000000..7a9f4a7 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_015.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_016.png b/Adam/assets/animations/mageWALKright/Walking_016.png new file mode 100644 index 0000000..9bd0aa3 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_016.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_017.png b/Adam/assets/animations/mageWALKright/Walking_017.png new file mode 100644 index 0000000..b19a729 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_017.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_018.png b/Adam/assets/animations/mageWALKright/Walking_018.png new file mode 100644 index 0000000..eda2666 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_018.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_019.png b/Adam/assets/animations/mageWALKright/Walking_019.png new file mode 100644 index 0000000..afb0ba7 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_019.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_020.png b/Adam/assets/animations/mageWALKright/Walking_020.png new file mode 100644 index 0000000..a058f25 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_020.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_021.png b/Adam/assets/animations/mageWALKright/Walking_021.png new file mode 100644 index 0000000..e2e7758 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_021.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_022.png b/Adam/assets/animations/mageWALKright/Walking_022.png new file mode 100644 index 0000000..31e0fba Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_022.png differ diff --git a/Adam/assets/animations/mageWALKright/Walking_023.png b/Adam/assets/animations/mageWALKright/Walking_023.png new file mode 100644 index 0000000..5ab86f8 Binary files /dev/null and b/Adam/assets/animations/mageWALKright/Walking_023.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_001.png b/Adam/assets/animations/projectileAXEright/Axe_001.png new file mode 100644 index 0000000..8a162a9 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_001.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_002.png b/Adam/assets/animations/projectileAXEright/Axe_002.png new file mode 100644 index 0000000..aea49dd Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_002.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_003.png b/Adam/assets/animations/projectileAXEright/Axe_003.png new file mode 100644 index 0000000..245a837 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_003.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_004.png b/Adam/assets/animations/projectileAXEright/Axe_004.png new file mode 100644 index 0000000..3626d14 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_004.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_005.png b/Adam/assets/animations/projectileAXEright/Axe_005.png new file mode 100644 index 0000000..c95c02c Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_005.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_006.png b/Adam/assets/animations/projectileAXEright/Axe_006.png new file mode 100644 index 0000000..c952266 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_006.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_007.png b/Adam/assets/animations/projectileAXEright/Axe_007.png new file mode 100644 index 0000000..ad34d76 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_007.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_008.png b/Adam/assets/animations/projectileAXEright/Axe_008.png new file mode 100644 index 0000000..313b129 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_008.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_009.png b/Adam/assets/animations/projectileAXEright/Axe_009.png new file mode 100644 index 0000000..268eab5 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_009.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_010.png b/Adam/assets/animations/projectileAXEright/Axe_010.png new file mode 100644 index 0000000..da07d12 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_010.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_011.png b/Adam/assets/animations/projectileAXEright/Axe_011.png new file mode 100644 index 0000000..0d7dceb Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_011.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_012.png b/Adam/assets/animations/projectileAXEright/Axe_012.png new file mode 100644 index 0000000..3ceab16 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_012.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_013.png b/Adam/assets/animations/projectileAXEright/Axe_013.png new file mode 100644 index 0000000..e7a27dc Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_013.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_014.png b/Adam/assets/animations/projectileAXEright/Axe_014.png new file mode 100644 index 0000000..367672a Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_014.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_015.png b/Adam/assets/animations/projectileAXEright/Axe_015.png new file mode 100644 index 0000000..9f0d7b1 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_015.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_016.png b/Adam/assets/animations/projectileAXEright/Axe_016.png new file mode 100644 index 0000000..55ddfa3 Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_016.png differ diff --git a/Adam/assets/animations/projectileAXEright/Axe_017.png b/Adam/assets/animations/projectileAXEright/Axe_017.png new file mode 100644 index 0000000..ba2a2ad Binary files /dev/null and b/Adam/assets/animations/projectileAXEright/Axe_017.png differ diff --git a/Adam/assets/animations/projectileFIREBALLright/Fireball_001.png b/Adam/assets/animations/projectileFIREBALLright/Fireball_001.png new file mode 100644 index 0000000..2e92a6c Binary files /dev/null and b/Adam/assets/animations/projectileFIREBALLright/Fireball_001.png differ diff --git a/Adam/assets/animations/projectileFIREBALLright/Fireball_002.png b/Adam/assets/animations/projectileFIREBALLright/Fireball_002.png new file mode 100644 index 0000000..36e10e1 Binary files /dev/null and b/Adam/assets/animations/projectileFIREBALLright/Fireball_002.png differ diff --git a/Adam/assets/animations/projectileFIREBALLright/Fireball_003.png b/Adam/assets/animations/projectileFIREBALLright/Fireball_003.png new file mode 100644 index 0000000..ed3b4be Binary files /dev/null and b/Adam/assets/animations/projectileFIREBALLright/Fireball_003.png differ diff --git a/Adam/assets/animations/projectileFIREBALLright/Fireball_004.png b/Adam/assets/animations/projectileFIREBALLright/Fireball_004.png new file mode 100644 index 0000000..2f2bcec Binary files /dev/null and b/Adam/assets/animations/projectileFIREBALLright/Fireball_004.png differ diff --git a/Adam/assets/animations/projectileFIREBALLright/Fireball_005.png b/Adam/assets/animations/projectileFIREBALLright/Fireball_005.png new file mode 100644 index 0000000..b02472f Binary files /dev/null and b/Adam/assets/animations/projectileFIREBALLright/Fireball_005.png differ diff --git a/Adam/assets/animations/projectileFIREBALLright/Fireball_006.png b/Adam/assets/animations/projectileFIREBALLright/Fireball_006.png new file mode 100644 index 0000000..1f37c0c Binary files /dev/null and b/Adam/assets/animations/projectileFIREBALLright/Fireball_006.png differ diff --git a/Adam/assets/animations/projectileFIREBALLright/Fireball_007.png b/Adam/assets/animations/projectileFIREBALLright/Fireball_007.png new file mode 100644 index 0000000..69dbf08 Binary files /dev/null and b/Adam/assets/animations/projectileFIREBALLright/Fireball_007.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_000.png b/Adam/assets/animations/skullDYINGright/Dying_000.png new file mode 100644 index 0000000..39a1d1e Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_000.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_001.png b/Adam/assets/animations/skullDYINGright/Dying_001.png new file mode 100644 index 0000000..d1623df Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_001.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_002.png b/Adam/assets/animations/skullDYINGright/Dying_002.png new file mode 100644 index 0000000..6bf3a37 Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_002.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_003.png b/Adam/assets/animations/skullDYINGright/Dying_003.png new file mode 100644 index 0000000..6f0621c Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_003.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_004.png b/Adam/assets/animations/skullDYINGright/Dying_004.png new file mode 100644 index 0000000..6ee61da Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_004.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_005.png b/Adam/assets/animations/skullDYINGright/Dying_005.png new file mode 100644 index 0000000..4fbe198 Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_005.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_006.png b/Adam/assets/animations/skullDYINGright/Dying_006.png new file mode 100644 index 0000000..9e64667 Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_006.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_007.png b/Adam/assets/animations/skullDYINGright/Dying_007.png new file mode 100644 index 0000000..d2575fe Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_007.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_008.png b/Adam/assets/animations/skullDYINGright/Dying_008.png new file mode 100644 index 0000000..52e6920 Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_008.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_009.png b/Adam/assets/animations/skullDYINGright/Dying_009.png new file mode 100644 index 0000000..3d38598 Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_009.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_010.png b/Adam/assets/animations/skullDYINGright/Dying_010.png new file mode 100644 index 0000000..da94c69 Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_010.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_011.png b/Adam/assets/animations/skullDYINGright/Dying_011.png new file mode 100644 index 0000000..35c0d2a Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_011.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_012.png b/Adam/assets/animations/skullDYINGright/Dying_012.png new file mode 100644 index 0000000..35c0d2a Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_012.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_013.png b/Adam/assets/animations/skullDYINGright/Dying_013.png new file mode 100644 index 0000000..35c0d2a Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_013.png differ diff --git a/Adam/assets/animations/skullDYINGright/Dying_014.png b/Adam/assets/animations/skullDYINGright/Dying_014.png new file mode 100644 index 0000000..35c0d2a Binary files /dev/null and b/Adam/assets/animations/skullDYINGright/Dying_014.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_000.png b/Adam/assets/animations/skullHURTright/Hurt_000.png new file mode 100644 index 0000000..39a1d1e Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_000.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_001.png b/Adam/assets/animations/skullHURTright/Hurt_001.png new file mode 100644 index 0000000..1f2eaf9 Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_001.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_002.png b/Adam/assets/animations/skullHURTright/Hurt_002.png new file mode 100644 index 0000000..3f6d2fa Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_002.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_003.png b/Adam/assets/animations/skullHURTright/Hurt_003.png new file mode 100644 index 0000000..769ccdd Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_003.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_004.png b/Adam/assets/animations/skullHURTright/Hurt_004.png new file mode 100644 index 0000000..e048c01 Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_004.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_005.png b/Adam/assets/animations/skullHURTright/Hurt_005.png new file mode 100644 index 0000000..7d05f32 Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_005.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_006.png b/Adam/assets/animations/skullHURTright/Hurt_006.png new file mode 100644 index 0000000..4320f31 Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_006.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_007.png b/Adam/assets/animations/skullHURTright/Hurt_007.png new file mode 100644 index 0000000..8d0aa5a Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_007.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_008.png b/Adam/assets/animations/skullHURTright/Hurt_008.png new file mode 100644 index 0000000..c37f12d Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_008.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_009.png b/Adam/assets/animations/skullHURTright/Hurt_009.png new file mode 100644 index 0000000..30d0a54 Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_009.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_010.png b/Adam/assets/animations/skullHURTright/Hurt_010.png new file mode 100644 index 0000000..0512ef5 Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_010.png differ diff --git a/Adam/assets/animations/skullHURTright/Hurt_011.png b/Adam/assets/animations/skullHURTright/Hurt_011.png new file mode 100644 index 0000000..cad1fa9 Binary files /dev/null and b/Adam/assets/animations/skullHURTright/Hurt_011.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_000.png b/Adam/assets/animations/skullIDLEright/Idle_000.png new file mode 100644 index 0000000..39a1d1e Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_000.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_001.png b/Adam/assets/animations/skullIDLEright/Idle_001.png new file mode 100644 index 0000000..d9dea2a Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_001.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_002.png b/Adam/assets/animations/skullIDLEright/Idle_002.png new file mode 100644 index 0000000..165eea3 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_002.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_003.png b/Adam/assets/animations/skullIDLEright/Idle_003.png new file mode 100644 index 0000000..58bc913 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_003.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_004.png b/Adam/assets/animations/skullIDLEright/Idle_004.png new file mode 100644 index 0000000..aca1213 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_004.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_005.png b/Adam/assets/animations/skullIDLEright/Idle_005.png new file mode 100644 index 0000000..8880b06 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_005.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_006.png b/Adam/assets/animations/skullIDLEright/Idle_006.png new file mode 100644 index 0000000..ff74315 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_006.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_007.png b/Adam/assets/animations/skullIDLEright/Idle_007.png new file mode 100644 index 0000000..a1542f8 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_007.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_008.png b/Adam/assets/animations/skullIDLEright/Idle_008.png new file mode 100644 index 0000000..c09531b Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_008.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_009.png b/Adam/assets/animations/skullIDLEright/Idle_009.png new file mode 100644 index 0000000..ceeba31 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_009.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_010.png b/Adam/assets/animations/skullIDLEright/Idle_010.png new file mode 100644 index 0000000..499cb95 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_010.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_011.png b/Adam/assets/animations/skullIDLEright/Idle_011.png new file mode 100644 index 0000000..4f52210 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_011.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_012.png b/Adam/assets/animations/skullIDLEright/Idle_012.png new file mode 100644 index 0000000..d05ddde Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_012.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_013.png b/Adam/assets/animations/skullIDLEright/Idle_013.png new file mode 100644 index 0000000..2cfa145 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_013.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_014.png b/Adam/assets/animations/skullIDLEright/Idle_014.png new file mode 100644 index 0000000..379d542 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_014.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_015.png b/Adam/assets/animations/skullIDLEright/Idle_015.png new file mode 100644 index 0000000..7ebf6a5 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_015.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_016.png b/Adam/assets/animations/skullIDLEright/Idle_016.png new file mode 100644 index 0000000..0457d1b Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_016.png differ diff --git a/Adam/assets/animations/skullIDLEright/Idle_017.png b/Adam/assets/animations/skullIDLEright/Idle_017.png new file mode 100644 index 0000000..38b2fa7 Binary files /dev/null and b/Adam/assets/animations/skullIDLEright/Idle_017.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_000.png b/Adam/assets/animations/skullSLASHINGright/Slashing_000.png new file mode 100644 index 0000000..472bed8 Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_000.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_001.png b/Adam/assets/animations/skullSLASHINGright/Slashing_001.png new file mode 100644 index 0000000..c4c2f5a Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_001.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_002.png b/Adam/assets/animations/skullSLASHINGright/Slashing_002.png new file mode 100644 index 0000000..d61296b Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_002.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_003.png b/Adam/assets/animations/skullSLASHINGright/Slashing_003.png new file mode 100644 index 0000000..438a839 Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_003.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_004.png b/Adam/assets/animations/skullSLASHINGright/Slashing_004.png new file mode 100644 index 0000000..c706434 Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_004.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_005.png b/Adam/assets/animations/skullSLASHINGright/Slashing_005.png new file mode 100644 index 0000000..7a82157 Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_005.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_006.png b/Adam/assets/animations/skullSLASHINGright/Slashing_006.png new file mode 100644 index 0000000..d472bb2 Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_006.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_007.png b/Adam/assets/animations/skullSLASHINGright/Slashing_007.png new file mode 100644 index 0000000..e260b8f Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_007.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_008.png b/Adam/assets/animations/skullSLASHINGright/Slashing_008.png new file mode 100644 index 0000000..830f57c Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_008.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_009.png b/Adam/assets/animations/skullSLASHINGright/Slashing_009.png new file mode 100644 index 0000000..31c7ae5 Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_009.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_010.png b/Adam/assets/animations/skullSLASHINGright/Slashing_010.png new file mode 100644 index 0000000..47f4520 Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_010.png differ diff --git a/Adam/assets/animations/skullSLASHINGright/Slashing_011.png b/Adam/assets/animations/skullSLASHINGright/Slashing_011.png new file mode 100644 index 0000000..c830b8d Binary files /dev/null and b/Adam/assets/animations/skullSLASHINGright/Slashing_011.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_000.png b/Adam/assets/animations/skullWALKright/Walking_000.png new file mode 100644 index 0000000..5bcf37f Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_000.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_001.png b/Adam/assets/animations/skullWALKright/Walking_001.png new file mode 100644 index 0000000..8733ef5 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_001.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_002.png b/Adam/assets/animations/skullWALKright/Walking_002.png new file mode 100644 index 0000000..6afe6d7 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_002.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_003.png b/Adam/assets/animations/skullWALKright/Walking_003.png new file mode 100644 index 0000000..face1cd Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_003.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_004.png b/Adam/assets/animations/skullWALKright/Walking_004.png new file mode 100644 index 0000000..94e74dc Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_004.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_005.png b/Adam/assets/animations/skullWALKright/Walking_005.png new file mode 100644 index 0000000..b182316 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_005.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_006.png b/Adam/assets/animations/skullWALKright/Walking_006.png new file mode 100644 index 0000000..ba198b0 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_006.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_007.png b/Adam/assets/animations/skullWALKright/Walking_007.png new file mode 100644 index 0000000..d1e2748 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_007.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_008.png b/Adam/assets/animations/skullWALKright/Walking_008.png new file mode 100644 index 0000000..882d590 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_008.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_009.png b/Adam/assets/animations/skullWALKright/Walking_009.png new file mode 100644 index 0000000..f1cc71f Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_009.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_010.png b/Adam/assets/animations/skullWALKright/Walking_010.png new file mode 100644 index 0000000..2e97ced Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_010.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_011.png b/Adam/assets/animations/skullWALKright/Walking_011.png new file mode 100644 index 0000000..0a4e653 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_011.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_012.png b/Adam/assets/animations/skullWALKright/Walking_012.png new file mode 100644 index 0000000..966301b Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_012.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_013.png b/Adam/assets/animations/skullWALKright/Walking_013.png new file mode 100644 index 0000000..88c6bab Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_013.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_014.png b/Adam/assets/animations/skullWALKright/Walking_014.png new file mode 100644 index 0000000..c29d00a Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_014.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_015.png b/Adam/assets/animations/skullWALKright/Walking_015.png new file mode 100644 index 0000000..d67dba8 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_015.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_016.png b/Adam/assets/animations/skullWALKright/Walking_016.png new file mode 100644 index 0000000..3cdb829 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_016.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_017.png b/Adam/assets/animations/skullWALKright/Walking_017.png new file mode 100644 index 0000000..4cb78f7 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_017.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_018.png b/Adam/assets/animations/skullWALKright/Walking_018.png new file mode 100644 index 0000000..762b590 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_018.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_019.png b/Adam/assets/animations/skullWALKright/Walking_019.png new file mode 100644 index 0000000..63e0d8b Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_019.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_020.png b/Adam/assets/animations/skullWALKright/Walking_020.png new file mode 100644 index 0000000..65edaab Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_020.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_021.png b/Adam/assets/animations/skullWALKright/Walking_021.png new file mode 100644 index 0000000..d3ac22e Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_021.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_022.png b/Adam/assets/animations/skullWALKright/Walking_022.png new file mode 100644 index 0000000..cf3842b Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_022.png differ diff --git a/Adam/assets/animations/skullWALKright/Walking_023.png b/Adam/assets/animations/skullWALKright/Walking_023.png new file mode 100644 index 0000000..9e10e19 Binary files /dev/null and b/Adam/assets/animations/skullWALKright/Walking_023.png differ diff --git a/Adam/assets/b.png b/Adam/assets/b.png new file mode 100644 index 0000000..e718df2 Binary files /dev/null and b/Adam/assets/b.png differ diff --git a/Adam/assets/backgrounds/BG.png b/Adam/assets/backgrounds/BG.png new file mode 100644 index 0000000..a1878b5 Binary files /dev/null and b/Adam/assets/backgrounds/BG.png differ diff --git a/Adam/assets/backgrounds/background.png b/Adam/assets/backgrounds/background.png new file mode 100644 index 0000000..626eaf9 Binary files /dev/null and b/Adam/assets/backgrounds/background.png differ diff --git a/Adam/assets/backgrounds/background2.png b/Adam/assets/backgrounds/background2.png new file mode 100644 index 0000000..6651294 Binary files /dev/null and b/Adam/assets/backgrounds/background2.png differ diff --git a/Adam/assets/backgrounds/casualBG.png b/Adam/assets/backgrounds/casualBG.png new file mode 100644 index 0000000..03db18b Binary files /dev/null and b/Adam/assets/backgrounds/casualBG.png differ diff --git a/Adam/assets/backgrounds/casualBounce.png b/Adam/assets/backgrounds/casualBounce.png new file mode 100644 index 0000000..318fb85 Binary files /dev/null and b/Adam/assets/backgrounds/casualBounce.png differ diff --git a/Adam/assets/backgrounds/casualFG.png b/Adam/assets/backgrounds/casualFG.png new file mode 100644 index 0000000..a750096 Binary files /dev/null and b/Adam/assets/backgrounds/casualFG.png differ diff --git a/Adam/assets/backgrounds/casualLVLend.png b/Adam/assets/backgrounds/casualLVLend.png new file mode 100644 index 0000000..a7fbcdd Binary files /dev/null and b/Adam/assets/backgrounds/casualLVLend.png differ diff --git a/Adam/assets/backgrounds/casualWater.png b/Adam/assets/backgrounds/casualWater.png new file mode 100644 index 0000000..5d40a5e Binary files /dev/null and b/Adam/assets/backgrounds/casualWater.png differ diff --git a/Adam/assets/backgrounds/causalLVLend.png b/Adam/assets/backgrounds/causalLVLend.png new file mode 100644 index 0000000..a7fbcdd Binary files /dev/null and b/Adam/assets/backgrounds/causalLVLend.png differ diff --git a/Adam/assets/backgrounds/caveBG.png b/Adam/assets/backgrounds/caveBG.png new file mode 100644 index 0000000..fa0f974 Binary files /dev/null and b/Adam/assets/backgrounds/caveBG.png differ diff --git a/Adam/assets/backgrounds/caveBounce.png b/Adam/assets/backgrounds/caveBounce.png new file mode 100644 index 0000000..032c594 Binary files /dev/null and b/Adam/assets/backgrounds/caveBounce.png differ diff --git a/Adam/assets/backgrounds/caveFG.png b/Adam/assets/backgrounds/caveFG.png new file mode 100644 index 0000000..4701a00 Binary files /dev/null and b/Adam/assets/backgrounds/caveFG.png differ diff --git a/Adam/assets/backgrounds/caveLVLend.png b/Adam/assets/backgrounds/caveLVLend.png new file mode 100644 index 0000000..a6ff060 Binary files /dev/null and b/Adam/assets/backgrounds/caveLVLend.png differ diff --git a/Adam/assets/backgrounds/caveSpikes.png b/Adam/assets/backgrounds/caveSpikes.png new file mode 100644 index 0000000..2d5b5e0 Binary files /dev/null and b/Adam/assets/backgrounds/caveSpikes.png differ diff --git a/Adam/assets/backgrounds/emptylvl.png b/Adam/assets/backgrounds/emptylvl.png new file mode 100644 index 0000000..ac95b77 Binary files /dev/null and b/Adam/assets/backgrounds/emptylvl.png differ diff --git a/Adam/assets/backgrounds/fgbouncelvl2.png b/Adam/assets/backgrounds/fgbouncelvl2.png new file mode 100644 index 0000000..3dedab9 Binary files /dev/null and b/Adam/assets/backgrounds/fgbouncelvl2.png differ diff --git a/Adam/assets/backgrounds/fglvl2.png b/Adam/assets/backgrounds/fglvl2.png new file mode 100644 index 0000000..6894191 Binary files /dev/null and b/Adam/assets/backgrounds/fglvl2.png differ diff --git a/Adam/assets/backgrounds/forest.png b/Adam/assets/backgrounds/forest.png new file mode 100644 index 0000000..f229728 Binary files /dev/null and b/Adam/assets/backgrounds/forest.png differ diff --git a/Adam/assets/backgrounds/forestNewGame.png b/Adam/assets/backgrounds/forestNewGame.png new file mode 100644 index 0000000..ab75d1d Binary files /dev/null and b/Adam/assets/backgrounds/forestNewGame.png differ diff --git a/Adam/assets/backgrounds/gradient.png b/Adam/assets/backgrounds/gradient.png new file mode 100644 index 0000000..8b1f444 Binary files /dev/null and b/Adam/assets/backgrounds/gradient.png differ diff --git a/Adam/assets/backgrounds/lvl2bg.png b/Adam/assets/backgrounds/lvl2bg.png new file mode 100644 index 0000000..598fc18 Binary files /dev/null and b/Adam/assets/backgrounds/lvl2bg.png differ diff --git a/Adam/assets/backgrounds/lvls.txt b/Adam/assets/backgrounds/lvls.txt new file mode 100644 index 0000000..e49477b --- /dev/null +++ b/Adam/assets/backgrounds/lvls.txt @@ -0,0 +1,20 @@ +lvl2 background assets/backgrounds/casualBG.png +lvl2 foreground assets/backgrounds/casualFG.png +lvl2 foreground_dmg assets/backgrounds/emptylvl.png +lvl2 foreground_bounce assets/backgrounds/casualBounce.png +lvl2 lvl_end assets/backgrounds/casualLVLend.png +lvl2 infinity assets/backgrounds/casualWater.png +lvl2 spawnpoint_player 1690,590 +lvl2 spawnpoint_npc 890,690 +lvl2 spawnpoint_enemy 2050,700 +lvl2 spawnpoint_enemy 2030,700 +lvl1 background assets/backgrounds/caveBG.png +lvl1 foreground assets/backgrounds/caveFG.png +lvl1 foreground_dmg assets/backgrounds/caveSpikes.png +lvl1 foreground_bounce assets/backgrounds/caveBounce.png +lvl1 lvl_end assets/backgrounds/caveLVLend.png +lvl1 infinity assets/backgrounds/emptylvl.png +lvl1 spawnpoint_player 890,690 +lvl1 spawnpoint_npc 890,690 +lvl1 spawnpoint_enemy 2050,700 +lvl1 spawnpoint_enemy 2030,700 diff --git a/Adam/assets/backgrounds/tiles2.png b/Adam/assets/backgrounds/tiles2.png new file mode 100644 index 0000000..d2943cb Binary files /dev/null and b/Adam/assets/backgrounds/tiles2.png differ diff --git a/Adam/assets/char.png b/Adam/assets/char.png new file mode 100644 index 0000000..c8f237f Binary files /dev/null and b/Adam/assets/char.png differ diff --git a/Adam/assets/char_alpha.bpng b/Adam/assets/char_alpha.bpng new file mode 100644 index 0000000..ffc43b2 Binary files /dev/null and b/Adam/assets/char_alpha.bpng differ diff --git a/Adam/assets/char_alpha.png b/Adam/assets/char_alpha.png new file mode 100644 index 0000000..ea1828a Binary files /dev/null and b/Adam/assets/char_alpha.png differ diff --git a/Adam/assets/char_alpha_invert.png b/Adam/assets/char_alpha_invert.png new file mode 100644 index 0000000..014b1d2 Binary files /dev/null and b/Adam/assets/char_alpha_invert.png differ diff --git a/Adam/assets/exp.png b/Adam/assets/exp.png new file mode 100644 index 0000000..5a2fad8 Binary files /dev/null and b/Adam/assets/exp.png differ diff --git a/Adam/assets/loading.png b/Adam/assets/loading.png new file mode 100644 index 0000000..e31a976 Binary files /dev/null and b/Adam/assets/loading.png differ diff --git a/Adam/assets/lvl.png b/Adam/assets/lvl.png new file mode 100644 index 0000000..337a125 Binary files /dev/null and b/Adam/assets/lvl.png differ diff --git a/Adam/assets/slimeTest.png b/Adam/assets/slimeTest.png new file mode 100644 index 0000000..7be0474 Binary files /dev/null and b/Adam/assets/slimeTest.png differ diff --git a/Adam/audio/Fireball_1.wav b/Adam/audio/Fireball_1.wav new file mode 100644 index 0000000..b709db4 Binary files /dev/null and b/Adam/audio/Fireball_1.wav differ diff --git a/Adam/audio/Fireball_2.wav b/Adam/audio/Fireball_2.wav new file mode 100644 index 0000000..bfeb1a4 Binary files /dev/null and b/Adam/audio/Fireball_2.wav differ diff --git a/Adam/audio/Fireball_3.wav b/Adam/audio/Fireball_3.wav new file mode 100644 index 0000000..6636756 Binary files /dev/null and b/Adam/audio/Fireball_3.wav differ diff --git a/Adam/audio/Fireball_4.wav b/Adam/audio/Fireball_4.wav new file mode 100644 index 0000000..a7a6477 Binary files /dev/null and b/Adam/audio/Fireball_4.wav differ diff --git a/Adam/audio/Male Death_2.wav b/Adam/audio/Male Death_2.wav new file mode 100644 index 0000000..80e0ea0 Binary files /dev/null and b/Adam/audio/Male Death_2.wav differ diff --git a/Adam/audio/Spell Revive.wav b/Adam/audio/Spell Revive.wav new file mode 100644 index 0000000..f17059e Binary files /dev/null and b/Adam/audio/Spell Revive.wav differ diff --git a/Adam/audio/Sword_1.wav b/Adam/audio/Sword_1.wav new file mode 100644 index 0000000..2a003cc Binary files /dev/null and b/Adam/audio/Sword_1.wav differ diff --git a/Adam/audio/Sword_2.wav b/Adam/audio/Sword_2.wav new file mode 100644 index 0000000..484222b Binary files /dev/null and b/Adam/audio/Sword_2.wav differ diff --git a/Adam/audio/Sword_3.wav b/Adam/audio/Sword_3.wav new file mode 100644 index 0000000..79549a7 Binary files /dev/null and b/Adam/audio/Sword_3.wav differ diff --git a/Adam/audio/Sword_4.wav b/Adam/audio/Sword_4.wav new file mode 100644 index 0000000..78f795b Binary files /dev/null and b/Adam/audio/Sword_4.wav differ diff --git a/Adam/audio/Sword_5.wav b/Adam/audio/Sword_5.wav new file mode 100644 index 0000000..31b80d8 Binary files /dev/null and b/Adam/audio/Sword_5.wav differ diff --git a/Adam/audio/Sword_6.wav b/Adam/audio/Sword_6.wav new file mode 100644 index 0000000..98dd0b2 Binary files /dev/null and b/Adam/audio/Sword_6.wav differ diff --git a/Adam/audio/audio.txt b/Adam/audio/audio.txt new file mode 100644 index 0000000..73056fe --- /dev/null +++ b/Adam/audio/audio.txt @@ -0,0 +1,41 @@ +Fireball audio/Fireball_1.wav +Fireball audio/Fireball_2.wav +Fireball audio/Fireball_3.wav +Fireball audio/Fireball_4.wav +footStep audio/footStep_1.wav +footStep audio/footStep_2.wav +footStep audio/footStep_3.wav +footStep audio/footStep_4.wav +footStep audio/footStep_5.wav +footStep audio/footStep_6.wav +footStep audio/footStep_7.wav +footStep audio/footStep_8.wav +footStep audio/footStep_9.wav +footStep audio/footStep_10.wav +Sword audio/Sword_1.wav +Sword audio/Sword_2.wav +Sword audio/Sword_3.wav +Sword audio/Sword_4.wav +Sword audio/Sword_5.wav +Sword audio/Sword_6.wav +maleAttack audio/maleAttack_1.wav +maleAttack audio/maleAttack_2.wav +maleAttack audio/maleAttack_3.wav +maleAttack audio/maleAttack_4.wav +maleAttack audio/maleAttack_5.wav +maleAttack audio/maleAttack_6.wav +maleAttack audio/maleAttack_7.wav +maleAttack audio/maleAttack_8.wav +maleAttack audio/maleAttack_9.wav +maleAttack audio/maleAttack_10.wav +MaleHurtPain audio/maleHurtPain_1.wav +MaleHurtPain audio/maleHurtPain_2.wav +MaleHurtPain audio/maleHurtPain_3.wav +MaleHurtPain audio/maleHurtPain_4.wav +MaleHurtPain audio/maleHurtPain_5.wav +MaleHurtPain audio/maleHurtPain_6.wav +MaleHurtPain audio/maleHurtPain_7.wav +MaleHurtPain audio/maleHurtPain_8.wav +MaleHurtPain audio/maleHurtPain_9.wav +MaleHurtPain audio/maleHurtPain_10.wav +MaleHurtPain audio/maleHurtPain_11.wav diff --git a/Adam/audio/footStep_1.wav b/Adam/audio/footStep_1.wav new file mode 100644 index 0000000..566fb4d Binary files /dev/null and b/Adam/audio/footStep_1.wav differ diff --git a/Adam/audio/footStep_10.wav b/Adam/audio/footStep_10.wav new file mode 100644 index 0000000..dfa685f Binary files /dev/null and b/Adam/audio/footStep_10.wav differ diff --git a/Adam/audio/footStep_2.wav b/Adam/audio/footStep_2.wav new file mode 100644 index 0000000..d8aceba Binary files /dev/null and b/Adam/audio/footStep_2.wav differ diff --git a/Adam/audio/footStep_3.wav b/Adam/audio/footStep_3.wav new file mode 100644 index 0000000..df3c274 Binary files /dev/null and b/Adam/audio/footStep_3.wav differ diff --git a/Adam/audio/footStep_4.wav b/Adam/audio/footStep_4.wav new file mode 100644 index 0000000..8ae618a Binary files /dev/null and b/Adam/audio/footStep_4.wav differ diff --git a/Adam/audio/footStep_5.wav b/Adam/audio/footStep_5.wav new file mode 100644 index 0000000..043ca42 Binary files /dev/null and b/Adam/audio/footStep_5.wav differ diff --git a/Adam/audio/footStep_6.wav b/Adam/audio/footStep_6.wav new file mode 100644 index 0000000..3c4be30 Binary files /dev/null and b/Adam/audio/footStep_6.wav differ diff --git a/Adam/audio/footStep_7.wav b/Adam/audio/footStep_7.wav new file mode 100644 index 0000000..b344a0b Binary files /dev/null and b/Adam/audio/footStep_7.wav differ diff --git a/Adam/audio/footStep_8.wav b/Adam/audio/footStep_8.wav new file mode 100644 index 0000000..af96455 Binary files /dev/null and b/Adam/audio/footStep_8.wav differ diff --git a/Adam/audio/footStep_9.wav b/Adam/audio/footStep_9.wav new file mode 100644 index 0000000..9a5799b Binary files /dev/null and b/Adam/audio/footStep_9.wav differ diff --git a/Adam/audio/introDrone.wav b/Adam/audio/introDrone.wav new file mode 100644 index 0000000..2670ab3 Binary files /dev/null and b/Adam/audio/introDrone.wav differ diff --git a/Adam/audio/maleAttack_1.wav b/Adam/audio/maleAttack_1.wav new file mode 100644 index 0000000..7c2d7db Binary files /dev/null and b/Adam/audio/maleAttack_1.wav differ diff --git a/Adam/audio/maleAttack_10.wav b/Adam/audio/maleAttack_10.wav new file mode 100644 index 0000000..843b718 Binary files /dev/null and b/Adam/audio/maleAttack_10.wav differ diff --git a/Adam/audio/maleAttack_2.wav b/Adam/audio/maleAttack_2.wav new file mode 100644 index 0000000..f58b10b Binary files /dev/null and b/Adam/audio/maleAttack_2.wav differ diff --git a/Adam/audio/maleAttack_3.wav b/Adam/audio/maleAttack_3.wav new file mode 100644 index 0000000..db2ddd1 Binary files /dev/null and b/Adam/audio/maleAttack_3.wav differ diff --git a/Adam/audio/maleAttack_4.wav b/Adam/audio/maleAttack_4.wav new file mode 100644 index 0000000..8516a9b Binary files /dev/null and b/Adam/audio/maleAttack_4.wav differ diff --git a/Adam/audio/maleAttack_5.wav b/Adam/audio/maleAttack_5.wav new file mode 100644 index 0000000..0fe4988 Binary files /dev/null and b/Adam/audio/maleAttack_5.wav differ diff --git a/Adam/audio/maleAttack_6.wav b/Adam/audio/maleAttack_6.wav new file mode 100644 index 0000000..6630667 Binary files /dev/null and b/Adam/audio/maleAttack_6.wav differ diff --git a/Adam/audio/maleAttack_7.wav b/Adam/audio/maleAttack_7.wav new file mode 100644 index 0000000..3b77af8 Binary files /dev/null and b/Adam/audio/maleAttack_7.wav differ diff --git a/Adam/audio/maleAttack_8.wav b/Adam/audio/maleAttack_8.wav new file mode 100644 index 0000000..1eb8c55 Binary files /dev/null and b/Adam/audio/maleAttack_8.wav differ diff --git a/Adam/audio/maleAttack_9.wav b/Adam/audio/maleAttack_9.wav new file mode 100644 index 0000000..c7aee68 Binary files /dev/null and b/Adam/audio/maleAttack_9.wav differ diff --git a/Adam/audio/maleHurtPain_1.wav b/Adam/audio/maleHurtPain_1.wav new file mode 100644 index 0000000..243d9f1 Binary files /dev/null and b/Adam/audio/maleHurtPain_1.wav differ diff --git a/Adam/audio/maleHurtPain_10.wav b/Adam/audio/maleHurtPain_10.wav new file mode 100644 index 0000000..3634523 Binary files /dev/null and b/Adam/audio/maleHurtPain_10.wav differ diff --git a/Adam/audio/maleHurtPain_11.wav b/Adam/audio/maleHurtPain_11.wav new file mode 100644 index 0000000..8866726 Binary files /dev/null and b/Adam/audio/maleHurtPain_11.wav differ diff --git a/Adam/audio/maleHurtPain_2.wav b/Adam/audio/maleHurtPain_2.wav new file mode 100644 index 0000000..18a3d6c Binary files /dev/null and b/Adam/audio/maleHurtPain_2.wav differ diff --git a/Adam/audio/maleHurtPain_3.wav b/Adam/audio/maleHurtPain_3.wav new file mode 100644 index 0000000..ccd6eab Binary files /dev/null and b/Adam/audio/maleHurtPain_3.wav differ diff --git a/Adam/audio/maleHurtPain_4.wav b/Adam/audio/maleHurtPain_4.wav new file mode 100644 index 0000000..bbaf9d4 Binary files /dev/null and b/Adam/audio/maleHurtPain_4.wav differ diff --git a/Adam/audio/maleHurtPain_5.wav b/Adam/audio/maleHurtPain_5.wav new file mode 100644 index 0000000..f20b589 Binary files /dev/null and b/Adam/audio/maleHurtPain_5.wav differ diff --git a/Adam/audio/maleHurtPain_6.wav b/Adam/audio/maleHurtPain_6.wav new file mode 100644 index 0000000..9ff349f Binary files /dev/null and b/Adam/audio/maleHurtPain_6.wav differ diff --git a/Adam/audio/maleHurtPain_7.wav b/Adam/audio/maleHurtPain_7.wav new file mode 100644 index 0000000..69fcf67 Binary files /dev/null and b/Adam/audio/maleHurtPain_7.wav differ diff --git a/Adam/audio/maleHurtPain_8.wav b/Adam/audio/maleHurtPain_8.wav new file mode 100644 index 0000000..ef6fac5 Binary files /dev/null and b/Adam/audio/maleHurtPain_8.wav differ diff --git a/Adam/audio/maleHurtPain_9.wav b/Adam/audio/maleHurtPain_9.wav new file mode 100644 index 0000000..9216ff8 Binary files /dev/null and b/Adam/audio/maleHurtPain_9.wav differ diff --git a/Adam/audio/voice_monster_roar_growl_groan_distant_01.wav b/Adam/audio/voice_monster_roar_growl_groan_distant_01.wav new file mode 100644 index 0000000..8c5ac05 Binary files /dev/null and b/Adam/audio/voice_monster_roar_growl_groan_distant_01.wav differ diff --git a/Adam/audio/voice_monster_roar_growl_groan_distant_02.wav b/Adam/audio/voice_monster_roar_growl_groan_distant_02.wav new file mode 100644 index 0000000..4b1df4c Binary files /dev/null and b/Adam/audio/voice_monster_roar_growl_groan_distant_02.wav differ diff --git a/Adam/audio/voice_monster_roar_growl_groan_distant_03.wav b/Adam/audio/voice_monster_roar_growl_groan_distant_03.wav new file mode 100644 index 0000000..4ecbb06 Binary files /dev/null and b/Adam/audio/voice_monster_roar_growl_groan_distant_03.wav differ diff --git a/Adam/audio/voice_orc_grunt_01.wav b/Adam/audio/voice_orc_grunt_01.wav new file mode 100644 index 0000000..3a995da Binary files /dev/null and b/Adam/audio/voice_orc_grunt_01.wav differ diff --git a/Adam/collision_handler.cpp b/Adam/collision_handler.cpp new file mode 100644 index 0000000..0abf000 --- /dev/null +++ b/Adam/collision_handler.cpp @@ -0,0 +1,26 @@ +#include "pch.h" +#include "collision_handler.h" +#include "Collision.h" + +namespace Adam +{ + collision_handler::collision_handler(sf::Sprite & layer) + { + collision_layer = &layer; + } + + collision_handler::collision_handler() {} + + collision_handler::~collision_handler() {} + + + bool collision_handler::collides_with_world(movable *object) + { + return Collision::PixelPerfectTest(*collision_layer, object->getBox()); + } + + bool collision_handler::collides_with_sprite(const sf::Sprite & object1, const sf::Sprite & object2) + { + return Collision::PixelPerfectTest(object1, object2); + } +} diff --git a/Adam/collision_handler.h b/Adam/collision_handler.h new file mode 100644 index 0000000..6f5f5d4 --- /dev/null +++ b/Adam/collision_handler.h @@ -0,0 +1,50 @@ +/// @file + +#pragma once +#include "Character.h" + + +//! I'm the only one that actually uses this namespace :( +namespace Adam +{ + /// \brief + /// Collision handling class + /// \details + /// "Helper" class that's mainly used for executing a function on a collision condition. + /// Keeps a pointer to the game's collision layer, so it can be changed when changing levels. + class collision_handler + { + public: + + sf::Sprite * collision_layer; + + /// \details + /// Constructor for the collision_handler class, takes a reference to the sprite to be used for world collision. + collision_handler(sf::Sprite & collision_layer); + + collision_handler(); + ~collision_handler(); + + /// \brief + /// handle collision function + /// \details + /// Executes a lambda function if the condition is met. + template + bool handle_collision(bool condition, LAMBDA f) + { + if (condition) f(); + return condition; + } + + /// \details + /// Abstracts the pixelperfecttest function to assist in checking collision. + bool collides_with_world(movable* object); + + + /// \details + /// Abstracts the pixelperfecttest function to assist in checking collision. + bool collides_with_sprite(const sf::Sprite & object1, const sf::Sprite & object2); + + }; +} + diff --git a/Adam/fighter.cpp b/Adam/fighter.cpp new file mode 100644 index 0000000..242afea --- /dev/null +++ b/Adam/fighter.cpp @@ -0,0 +1,42 @@ +#include "pch.h" +#include "fighter.h" + + + +fighter::fighter(statistic health_c, int lvl_c) +{ + health = health_c; + lvl = lvl_c; + AABB_H.loadFromFile("assets/AABB_H.png"); +} + +bool fighter::fight(fighter * opponent) { + + if (Collision::PixelPerfectTest(makeFightBox(), opponent->getBox())) { + updateFollowPosition(0); + opponent->take_damage(20+lvl*lvl); + opponent->update_info(); + return true; + } + return false; + +} + + +void fighter::take_damage(int amount) +{ + if (!checkDead()) + { + health.current = health.current - amount; + } + else + { + health.zero(); + } + + +} + +bool fighter::checkDead() { + return health.is_zero(); +} diff --git a/Adam/fighter.h b/Adam/fighter.h new file mode 100644 index 0000000..25c8d80 --- /dev/null +++ b/Adam/fighter.h @@ -0,0 +1,92 @@ +#pragma once + +#include "statistic.h" +#include "Movable.h" +#include "fighter.h" +#include "Animated.hpp" +///@file + +/// \brief +/// fighter +/// \details +/// This is a parent class for all classes that are fighters. +/// It consists all shared attributes of a fighter +class fighter +{ +public: + int lvl; + statistic health; + + sf::Texture AABB_H; + + /// \brief + /// contructor + /// \details + /// The constructor initialize the health statistic & lvl of a fighter. + /// Loads the boundingbox of a fighter. + fighter(statistic health_c = statistic(100, 100), int lvl_c = 1); + + /// \brief + /// update_info + /// \details + /// this is a virtual function. + /// Can be used to implement a function that updates the info of a fighter. + virtual void update_info() {} + + /// \brief + /// update_info_pos + /// \details + /// this is a virtual function. + /// Can be used to implement a function that updates the position of some info. + virtual void update_info_pos(sf::RenderWindow & window) {} + + /// \brief + /// update_info + /// \details + /// this is a virtual function. + /// Can be used to implement a function to update a follow position. + virtual void updateFollowPosition(int x) {} + + /// \brief + /// fight with opponent + /// \details + /// If attack overlaps with opponent. + /// oppenent takes damage & updates info + /// returns if fighter has hit his oppenent + virtual bool fight(fighter * opponent); + + /// \brief + /// take damage + /// \details + /// Calls checkDead function. + /// If False amount is subtrected from fighters health + /// Else fighters health is zero + void take_damage(int amount); + + /// \brief + /// update_info + /// \details + /// this is a pure virtual function. + /// Must be used to implement a die function. + virtual void die() = 0; + + /// \brief + /// update_info + /// \details + /// this is a pure virtual function. + /// Must be used to implement a get function. + virtual sf::Sprite getBox() = 0; + + /// \brief + /// update_info + /// \details + /// this is a pure virtual function. + /// Must be used to implement a makeFightBox function. + virtual sf::Sprite makeFightBox() =0; + + /// \brief + /// check if fighter is dead + /// \details + /// Returns if the health of a fighter is equal or lower then zero. + bool checkDead(); +}; \ No newline at end of file diff --git a/Adam/fonts/stranger.ttf b/Adam/fonts/stranger.ttf new file mode 100644 index 0000000..7a46fe5 Binary files /dev/null and b/Adam/fonts/stranger.ttf differ diff --git a/Adam/fonts/stranger_back_in_the_night.zip b/Adam/fonts/stranger_back_in_the_night.zip new file mode 100644 index 0000000..3b472c7 Binary files /dev/null and b/Adam/fonts/stranger_back_in_the_night.zip differ diff --git a/Adam/ingameMenu.cpp b/Adam/ingameMenu.cpp new file mode 100644 index 0000000..e3fd5c5 --- /dev/null +++ b/Adam/ingameMenu.cpp @@ -0,0 +1,92 @@ +#include "pch.h" +#include "ingameMenu.hpp" + +inGameMenu::inGameMenu(float width, float heigth, Character &player) : + player(player) +{ + if (!font.loadFromFile("fonts/stranger.ttf")) + { + std::cout << "error loading font" << std::endl; + } + + pauseScreen[0].setString("Continue Game"); + pauseScreen[1].setString("Load Game"); + pauseScreen[2].setString("Return main menu"); + pauseScreen[3].setString("Quit Game"); + + for (int i = 0; i < pauseOptions; i++) { + pauseScreen[i].setFont(font); + pauseScreen[i].setCharacterSize(80); + pauseScreen[i].setFillColor(sf::Color::White); + pauseScreen[i].setPosition(sf::Vector2f((player.getPosition().x) - 100, (player.getPosition().y) + 50 *(i-2)-20)); + } + pauseScreen[0].setFillColor(sf::Color::Red); + + + setInGame(); + //current_state = menu_states::s_ingameMenu; + selectedItem = 0; +} + +void inGameMenu::draw(sf::RenderWindow & window, levelManager & lvls, std::shared_ptr & enemy) +{ + window.draw(lvls.background); + window.draw(lvls.ground); + window.draw(lvls.damage_background); + window.draw(sf::Sprite(player)); + window.draw(sf::Sprite(*enemy)); + for (unsigned int i = 0; i < pauseOptions; i++) + { + window.draw(pauseScreen[i]); + } +} + +void inGameMenu::moveUp() +{ + pauseScreen[selectedItem].setFillColor(sf::Color::White); + if (selectedItem - 1 >= 0) + { + selectedItem--; + } + else + { + selectedItem = pauseOptions-1; + } + pauseScreen[selectedItem].setFillColor(sf::Color::Red); +} + +void inGameMenu::moveDown() +{ + pauseScreen[selectedItem].setFillColor(sf::Color::White); + if (selectedItem + 1 < pauseOptions) + { + selectedItem++; + } + else + { + selectedItem = 0; + } + pauseScreen[selectedItem].setFillColor(sf::Color::Red); +} + +int inGameMenu::chooseTile(std::shared_ptr & currentMenu, Character & player, sf::Window & window, AnimationManager & ani) +{ + if (selectedItem == 0) { + //state = STATE::PLAYING; + return 2; + } + else if (selectedItem == 1) { + std::cout << "option not made yet" << '\n'; + } + else if (selectedItem == 2) { + currentMenu = std::make_shared(window.getSize().x, window.getSize().y, player); + std::cout << "terug naar menu"; + setMain(); + //menu_states = menu_states::MAIN; + } + else if (selectedItem == 3) { + window.close(); + } + + return 0; +} \ No newline at end of file diff --git a/Adam/ingameMenu.hpp b/Adam/ingameMenu.hpp new file mode 100644 index 0000000..3affca2 --- /dev/null +++ b/Adam/ingameMenu.hpp @@ -0,0 +1,28 @@ +#ifndef INGAMEMENU_HPP +#define INGAMEMENU_HPP + +#include "menu.hpp" +#include "Character.h" +#include "game.hpp" + +#define pauseOptions 4 + +class inGameMenu: public Menu +{ +private: + float width; + float heigth; + sf::Font font; + sf::Text pauseScreen[pauseOptions]; + Character &player; +public: + inGameMenu(float width, float heigth, Character &player); + + void draw(sf::RenderWindow & window, levelManager & lvls, std::shared_ptr & enemy) override; + void moveUp() override; + void moveDown() override; + int chooseTile(std::shared_ptr & currentMenu, Character & player, sf::Window & window, AnimationManager & ani) override; +}; + + +#endif INGAMEMENU_HPP \ No newline at end of file diff --git a/Adam/levelManager.cpp b/Adam/levelManager.cpp new file mode 100644 index 0000000..e29eac3 --- /dev/null +++ b/Adam/levelManager.cpp @@ -0,0 +1,205 @@ +#include "pch.h" +#include "levelManager.h" +#include "Collision.h" +#include "algorithm" + +levelManager::levelManager() +{ + loading.loadFromFile("assets/loading.png"); + loading_screen.setTexture(loading); + std::string prev = ""; + std::string line; + std::ifstream lvls_file("assets/backgrounds/lvls.txt"); + if (lvls_file.is_open()) + { + std::string item, name, lvl = ""; + int count = 0; + while (lvls_file >> lvl >> name >> item) + { + if (name == "background") + { + lvls[lvl]["background"] = item; + } + else if (name == "foreground") + { + lvls[lvl]["foreground"] = item; + } + else if (name == "foreground_dmg") + { + lvls[lvl]["foreground_dmg"] = item; + } + else if (name == "foreground_bounce") + { + lvls[lvl]["foreground_bounce"] = item; + } + else if (name == "lvl_end") + { + lvls[lvl]["lvl_end"] = item; + } + else if (name == "infinity") + { + lvls[lvl]["infinity"] = item; + } + else if (name == "spawnpoint_player") + { + lvls[lvl]["spawnpoint_player"] = item; + } + else if (name == "spawnpoint_enemy") + { + spawnpoints_enemys[lvl][count++] = to_vector(item); + } + else if (name == "spawnpoint_npc") + { + spawnpoints_npcs[lvl][count++] = to_vector(item); + } + if (prev != lvl) + { + prev = lvl; + maps.push_back(lvl); + } + + } + } + //print(); +} + +void levelManager::print() +{ + for (auto & lvl : lvls) + { + std::cout << lvl.first << ":\n"; + for (auto & info : lvl.second) + { + std::cout << info.first << " = " << info.second << '\n'; + } +/* + for (auto & s : spawnpoints_enemys) + { + std::cout << s.first << " enemys spawnpoints: \n"; + for (auto & in : s.second) + { + std::cout << in.first << " = " << in.second << '\n'; + } + }*/ + + } + +} + +sf::Vector2f levelManager::to_vector(std::string vec) { + bool seen = false; + sf::Vector2f new_vec; + std::string tmp = ""; + for (char & c : vec) + { + if (c != ',') + { + if (seen) + { + tmp += c; + } + else + { + tmp += c; + } + } + else + { + seen = true; + new_vec.x = std::stof(tmp); + tmp = ""; + } + + } + new_vec.y = std::stof(tmp); + return new_vec; +} + +void levelManager::make_lvl(std::string lvl_name) +{ + Collision::removeBitmask(&tex); + Collision::removeBitmask(&tex2); + Collision::removeBitmask(&tex3); + Collision::removeBitmask(&tex4); + Collision::removeBitmask(&tex5); + Collision::removeBitmask(&tex6); + tex.loadFromFile(lvls[lvl_name]["foreground"]); + tex2.loadFromFile(lvls[lvl_name]["background"]); + tex3.loadFromFile(lvls[lvl_name]["foreground_dmg"]); + tex4.loadFromFile(lvls[lvl_name]["foreground_bounce"]); + tex5.loadFromFile(lvls[lvl_name]["lvl_end"]); + tex6.loadFromFile(lvls[lvl_name]["infinity"]); + + ground.setTexture(tex, 1); + background.setTexture(tex2, 1); + damage_background.setTexture(tex3, 1); + foreground_bounce.setTexture(tex4, 1); + end.setTexture(tex5, 1); + infinity.setTexture(tex6, 1); + for ( int i = 0; i < spawnpoints_enemys[lvl_name].size(); i++) + { + current_lvl_enemys.push_back(spawnpoints_enemys[lvl_name][i]); + } + + for (int i = 0; i < spawnpoints_npcs[lvl_name].size(); i++) + { + current_lvl_npcs.push_back(spawnpoints_npcs[lvl_name][i]); + } + + playerSpawn = to_vector(lvls[lvl_name]["spawnpoint_player"]); +} + +void levelManager::next_lvl(Character & player) +{ + + make_lvl(maps[current_lvl]); + player.set_spawn(playerSpawn); + player.respawn(); + current_lvl--; + if (current_lvl < 0) + { + current_lvl = maps.size()-1; + } + +} + +void levelManager::check_interaction(Character & player, sf::RenderWindow & window) +{ + if (Collision::PixelPerfectTest(damage_background, player)) + { + player.health.sub(((float)(player.health.max / 100) * 0.5f)); + + } + + if (Collision::PixelPerfectTest(infinity, player)) + { + player.respawn(); + + } + + if (Collision::PixelPerfectTest(end, player)) + { + /*window.clear(); + window.setView(hud); + window.draw(loading_screen); + window.display();*/ + next_lvl(player); + + } + if (Collision::PixelPerfectTest(foreground_bounce, player)) + { + player.setVelocity(sf::Vector2f(player.getVelocity().x, -2 * bounce_velocity)); + + if (bounce_velocity < 9) + { + bounce_velocity += 2; + } + } + else { + if (player.getVelocity().y == 0 && bounce_velocity > 1) + { + bounce_velocity--; + } + } +} + diff --git a/Adam/levelManager.h b/Adam/levelManager.h new file mode 100644 index 0000000..8820586 --- /dev/null +++ b/Adam/levelManager.h @@ -0,0 +1,68 @@ +#pragma once + +#include "Character.h" +///@file + +/// \brief +/// levelManager +/// \details +/// Managed the info of lvls (lvl map ,spawnpoints) +class levelManager +{ +private: + std::vector maps = {}; + std::map > spawnpoints_enemys; + std::map > spawnpoints_npcs; + int current_lvl = maps.size()+1; + int bounce_velocity = 1; + sf::Texture tex, tex2, tex3, tex4, tex5, tex6; + sf::Sprite loading_screen; + sf::Texture loading; +public: + sf::Vector2f playerSpawn = {}; + sf::Sprite background, damage_background, ground, foreground_bounce, end, infinity; + std::vector current_lvl_enemys; + std::vector current_lvl_npcs; + std::map > lvls; + + /// \brief + /// contructor + /// \details + /// Reads the lvl.txt file for all lvl attributes & puts it in a map. + levelManager(); + + /// \brief + /// prints map + /// \details + /// Prints the map(attributes of each lvl). + void print(); + + /// \brief + /// convert vector in string to vector + /// \details + /// Reads string & splits is on ','. + /// returns sf::Vector2f. + sf::Vector2f to_vector(std::string vec); + + /// \brief + /// make new lvl + /// \details + /// Sets textures of next lvl. + /// Sets new spawnpoint of player + void make_lvl(std::string lvl_name); + + /// \brief + /// next lvl + /// \details + /// Checks if there is a next lvl. + /// Calls make_lvl function. + /// Respawns player. + void next_lvl(Character & player); + + /// \brief + /// checks interaction + /// details + /// Checks interaction between player and certain layers of lvl. + void check_interaction(Character & player, sf::RenderWindow & window); +}; + diff --git a/Adam/main.cpp b/Adam/main.cpp index c2fa060..9926af7 100644 --- a/Adam/main.cpp +++ b/Adam/main.cpp @@ -1,23 +1,47 @@ -#include +#include "pch.h" +#include "mainMenu.hpp" +#include "Collision.h" +#include "Character.h" +#include "Game.hpp" +#include "HUD.hpp" +#include "statistic.h" +#include "AnimationManager.h" +#include "Audio.hpp" + +using namespace std; +using namespace sf; int main() { - sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); - sf::CircleShape shape(100.f); - shape.setFillColor(sf::Color::Green); + RenderWindow window(VideoMode(1920, 1080, 32), "Project: ADAM", sf::Style::None); + + sf::Sprite loading_screen; + sf::Texture loading; + loading.loadFromFile("assets/loading.png"); + loading_screen.setTexture(loading); + window.draw(loading_screen); + window.display(); + AnimationManager ani("assets/animations/animations.txt"); + + + sf::Event e; + while (window.pollEvent(e)) + { + window.clear(sf::Color::Yellow); + } + + Character player(sf::Vector2f(890, 690), sf::Vector2f(0.2, 0.2), ani.animations["mage"], sf::Vector2f(0, 0), statistic(200, 200), statistic(300, 300), statistic(80, 0)); + Audio geluidje("audio/audio.txt"); + HUD hud(player); + Game game(window, player, hud, ani, geluidje); + while (window.isOpen()) { - sf::Event event; - while (window.pollEvent(event)) - { - if (event.type == sf::Event::Closed) - window.close(); - } + game.handleInput(); + game.update(); + game.render(); - window.clear(); - window.draw(shape); - window.display(); } return 0; diff --git a/Adam/mainMenu.cpp b/Adam/mainMenu.cpp new file mode 100644 index 0000000..7e4c26c --- /dev/null +++ b/Adam/mainMenu.cpp @@ -0,0 +1,132 @@ +#include "pch.h" +#include "mainMenu.hpp" +#include "newGameMenu.hpp" + +mainMenu::mainMenu(float width, float heigth, Character &player) + +{ + if (!font.loadFromFile("fonts/stranger.ttf")) + { + std::cout << "error loading font" << std::endl; + } + + menuChoices[0].setString("New Game"); + menuChoices[1].setString("Continue Game"); + menuChoices[2].setString("Load Game"); + menuChoices[3].setString("Options"); + menuChoices[4].setString("Quit Game"); + + for (int i = 0; i < numberOfTiles; i++) { + menuChoices[i].setFont(font); + menuChoices[i].setCharacterSize(160); + menuChoices[i].setFillColor(sf::Color::White); + menuChoices[i].setPosition(sf::Vector2f((player.getPosition().x) - 200, (player.getPosition().y) + 160 * (i - 2) - 120)); + } + menuChoices[0].setFillColor(sf::Color::Red); + + /* + menuChoices[0].setFont(font); + menuChoices[0].setString("New Game"); + menuChoices[0].setFillColor(sf::Color::Red); + menuChoices[0].setCharacterSize(111); + menuChoices[0].setPosition(sf::Vector2f((width / 2) * 0.85, (numberOfTiles + 1) * 30)); + + menuChoices[1].setFont(font); + menuChoices[1].setFillColor(sf::Color::White); + menuChoices[1].setString("Continue Game"); + menuChoices[1].setCharacterSize(111); + menuChoices[1].setPosition(sf::Vector2f((width / 2)* 0.85, (numberOfTiles + 1) * 50)); + + menuChoices[2].setFont(font); + menuChoices[2].setFillColor(sf::Color::White); + menuChoices[2].setString("Load Game"); + menuChoices[2].setCharacterSize(111); + menuChoices[2].setPosition(sf::Vector2f((width / 2) * 0.85, (numberOfTiles + 1) * 70)); + + menuChoices[3].setFont(font); + menuChoices[3].setFillColor(sf::Color::White); + menuChoices[3].setString("Options"); + menuChoices[3].setCharacterSize(111); + menuChoices[3].setPosition(sf::Vector2f((width / 2)* 0.85, (numberOfTiles + 1) * 90)); + + menuChoices[4].setFont(font); + menuChoices[4].setFillColor(sf::Color::White); + menuChoices[4].setString("Quit Game"); + menuChoices[4].setCharacterSize(111); + menuChoices[4].setPosition(sf::Vector2f((width / 2)* 0.85, (numberOfTiles + 1) * 110)); */ + + selectedItem = 0; + setMain(); + //current_state = menu_states::s_mainMenu; + //gameStarted = 0; +} + +void mainMenu::draw(sf::RenderWindow & window, sf::View & main_camera, sf::Sprite & bgMain, Character & player) +{ + main_camera.setSize(1920, 1080); + sf::Vector2f playerposforbg = player.getPosition(); + bgMain.setPosition(sf::Vector2f(playerposforbg.x - 960, playerposforbg.y - 540)); + window.draw(bgMain); + + for (unsigned int i = 0; i < numberOfTiles; i++) + { + window.draw(menuChoices[i]); + } + window.setView(main_camera); +} + +void mainMenu::moveUp() +{ + menuChoices[selectedItem].setFillColor(sf::Color::White); + if (selectedItem - 1 >= 0) + { + selectedItem--; + } + else + { + selectedItem = numberOfTiles - 1 ; + } + menuChoices[selectedItem].setFillColor(sf::Color::Red); +} +void mainMenu::moveDown() +{ + menuChoices[selectedItem].setFillColor(sf::Color::White); + if (selectedItem + 1 < numberOfTiles) + { + + selectedItem++; + + } + else + { + selectedItem = 0; + } + menuChoices[selectedItem].setFillColor(sf::Color::Red); +} + +int mainMenu::chooseTile(std::shared_ptr ¤tMenu, Character & player, sf::Window & window, AnimationManager & ani) +{ + if (selectedItem == 0) { + currentMenu = std::make_shared(window.getSize().x, window.getSize().y, player); + //menu_states = menu_states::NEWGAME; + setNewGame(); + std::cout << "set newGAMe \n"; + } + else if (selectedItem == 1) { + //state = STATE::PLAYING; + std::cout << "set ingame \n"; + //menu_states = menu_states::INGAME; + setInGame(); + return 2; + } + else if (selectedItem == 2) { + std::cout << "not made yet"; + } + else if (selectedItem == 3) { + std::cout << "option menu not made yet" << std::endl; + } + else if (selectedItem == 4) { + window.close(); + } + return 0; +} \ No newline at end of file diff --git a/Adam/mainMenu.hpp b/Adam/mainMenu.hpp new file mode 100644 index 0000000..625d963 --- /dev/null +++ b/Adam/mainMenu.hpp @@ -0,0 +1,31 @@ +#ifndef _MAINMENU_HPP +#define _MAINMENU_HPP + +#include "menu.hpp" + +#define numberOfTiles 5 + +class mainMenu : public Menu +{ +private: + float width; + float heigth; + sf::Font font; + sf::Text menuChoices[numberOfTiles]; + + + +public: + mainMenu(float width, float heigth, Character &player); + + void draw(sf::RenderWindow & window, sf::View & main_camera, sf::Sprite & bgMain, Character & player) override; + void moveUp() override; + void moveDown() override; + int chooseTile(std::shared_ptr ¤tMenu, Character & player, sf::Window & window, AnimationManager & ani) override; + +}; + + + + +#endif // !MENU_HPP diff --git a/Adam/music/BRPG_Assault_FULL_Loop.wav b/Adam/music/BRPG_Assault_FULL_Loop.wav new file mode 100644 index 0000000..1d9584a Binary files /dev/null and b/Adam/music/BRPG_Assault_FULL_Loop.wav differ diff --git a/Adam/music/BRPG_Hell_Spawn_no_Per-Choir-Piano_Loop.wav b/Adam/music/BRPG_Hell_Spawn_no_Per-Choir-Piano_Loop.wav new file mode 100644 index 0000000..ee22c32 Binary files /dev/null and b/Adam/music/BRPG_Hell_Spawn_no_Per-Choir-Piano_Loop.wav differ diff --git a/Adam/music/BRPG_Take_Courage_FULL_Loop.wav b/Adam/music/BRPG_Take_Courage_FULL_Loop.wav new file mode 100644 index 0000000..a0ee865 Binary files /dev/null and b/Adam/music/BRPG_Take_Courage_FULL_Loop.wav differ diff --git a/Adam/music/BRPG_Vanquisher_FULL_Loop.wav b/Adam/music/BRPG_Vanquisher_FULL_Loop.wav new file mode 100644 index 0000000..5ed19d1 Binary files /dev/null and b/Adam/music/BRPG_Vanquisher_FULL_Loop.wav differ diff --git a/Adam/newGameMenu.cpp b/Adam/newGameMenu.cpp new file mode 100644 index 0000000..dd1c297 --- /dev/null +++ b/Adam/newGameMenu.cpp @@ -0,0 +1,162 @@ +#include "pch.h" +#include "newGameMenu.hpp" + +newGameMenu::newGameMenu(float width, float heigth, Character & player) +{ + if (!font.loadFromFile("fonts/stranger.ttf")) + { + std::cout << "error loading font" << std::endl; + } + + menuChoices[0].setString("What class do you want to play?"); + menuChoices[1].setString("The Warrior! A stalward defender of justice and honor. Skilled with the sword! Has more health than the mage."); + menuChoices[2].setString("The Mage! A fireball shooting spellcaster, burning all enemies in his wake!, Has more speed than the warrior."); + menuChoices[3].setString("Choose your Class and venture forth into the world!"); + + for (int i = 0; i < newGameTiles; i++) { + menuChoices[i].setFont(font); + menuChoices[i].setCharacterSize(90); + if (i == 1 || i == 2) { + menuChoices[i].setPosition(sf::Vector2f((player.getPosition().x - 800), (player.getPosition().y) + 200 * (i - 2) - 40)); + } + else { + menuChoices[i].setPosition(sf::Vector2f((player.getPosition().x - 30), (player.getPosition().y) + 230 * (i - 2) - 40)); + } + } + menuChoices[0].setFillColor(sf::Color::Red); + menuChoices[1].setFillColor(sf::Color::Yellow); + menuChoices[2].setFillColor(sf::Color::White); + menuChoices[3].setFillColor(sf::Color::Red); + + /* + menuChoices[0].setFont(font); + menuChoices[0].setFillColor(sf::Color::Red); + menuChoices[0].setString( + "What class do you want to play?"); + menuChoices[0].setCharacterSize(111); + menuChoices[0].setPosition(sf::Vector2f((width / 2) * 0.85, (newGameTiles + 1) * 30)); + + menuChoices[1].setFont(font); + menuChoices[1].setString( + "The Warrior! A stalward defender of justice and honor. Skilled with the sword! Has more health than the mage."); + menuChoices[1].setFillColor(sf::Color::Yellow); + menuChoices[1].setCharacterSize(55); + menuChoices[1].setPosition(sf::Vector2f((width / 8) * 0.85, (newGameTiles + 1) * 60)); + + menuChoices[2].setFont(font); + menuChoices[2].setString( + "The Mage! A fireball shooting spellcaster, burning all enemies in his wake!, Has more speed than the warrior."); + menuChoices[2].setFillColor(sf::Color::White); + menuChoices[2].setCharacterSize(55); + menuChoices[2].setPosition(sf::Vector2f((width / 8) * 0.85, (newGameTiles + 1) * 90)); + + menuChoices[3].setFont(font); + menuChoices[3].setString( + "Choose your Class and venture forth into the world!"); + menuChoices[3].setFillColor(sf::Color::Red); + menuChoices[3].setCharacterSize(77); + menuChoices[3].setPosition(sf::Vector2f((width / 2) * 0.85, (newGameTiles + 1) * 120)); + */ + + selectedItem = 1; + setNewGame(); + //current_state = menu_states::s_newGameMenu; +} + +void newGameMenu::draw(sf::RenderWindow & window, sf::View & main_camera, sf::Sprite & bgMain, Character & player) +{ + main_camera.setSize(1920, 1080); + sf::Vector2f playerposforbg = player.getPosition(); + bgMain.setPosition(sf::Vector2f(playerposforbg.x - 960, playerposforbg.y - 540)); + window.draw(bgMain); + for (unsigned int i = 0; i < newGameTiles; i++) + { + window.draw(menuChoices[i]); + } + window.setView(main_camera); +} + +void newGameMenu::moveUp() +{ + menuChoices[selectedItem].setFillColor(sf::Color::White); + if (selectedItem - 1 >= 1) + { + selectedItem--; + } + else + { + selectedItem = newGameTiles - 3; + } + menuChoices[selectedItem].setFillColor(sf::Color::Yellow); +} + +void newGameMenu::moveDown() +{ + menuChoices[selectedItem].setFillColor(sf::Color::White); + if (selectedItem + 1 < newGameTiles-2) + { + + selectedItem++; + + } + else + { + selectedItem = 1; + } + menuChoices[selectedItem].setFillColor(sf::Color::Yellow); +} + +int newGameMenu::chooseTile(std::shared_ptr & currentMenu, Character & player, sf::Window & window, AnimationManager & ani) +{ + if (selectedItem == 0) { + + } + else if (selectedItem == 1) { + std::cout << "warrior has been chosen" << '\n'; + //state = STATE::PLAYING; + player.setAnimationMap(ani.animations["knight"]); + player.setAnimation("IDLEright", Animation::intervals::idle); + player.setTexture(player.currentAnimation.nextFrame()); + player.setTexture(player.currentAnimation.nextFrame()); + player.setProjectile([&](sf::Vector2f pos1, sf::Vector2f pos2, std::map animations) { + sf::Vector2f direction(pos2.x - pos1.x, pos2.y - pos1.y); + direction.y = (direction.y * 5) / direction.x; + direction.x = 5; + sf::Texture tex; + std::shared_ptr prj = std::make_shared(projectile(pos1, sf::Vector2f(1.0, 1.0), animations, direction, 10.0)); + prj->setTexture(tex); + prj->setAnimation("AXEright", Animation::intervals::idle); + return prj; + }, ani.animations["projectile"]); + //menu_states = menu_states::INGAME; + setInGame(); + //gameStarted = 1; + return 2; + } + else if (selectedItem == 2) { + std::cout << "hunter has been chosen" << '\n'; + //state = STATE::PLAYING; + player.setAnimationMap(ani.animations["mage"]); + player.setAnimation("IDLEright", Animation::intervals::idle); + player.setTexture(player.currentAnimation.nextFrame()); + player.setProjectile([&](sf::Vector2f pos1, sf::Vector2f pos2, std::map animations) { + sf::Vector2f direction(pos2.x - pos1.x, pos2.y - pos1.y); + direction.y = (direction.y * 5) / direction.x; + direction.x = 5; + sf::Texture tex; + std::shared_ptr prj = std::make_shared(projectile(pos1, sf::Vector2f(1.0, 1.0), animations, direction, 10.0)); + prj->setTexture(tex); + prj->setAnimation("FIREBALLright", Animation::intervals::idle); + return prj; + }, ani.animations["projectile"]); + + //menu_states = menu_states::INGAME; + setInGame(); + //gameStarted = 1; + return 2; + } + else if (selectedItem == 3) { + std::cout << "option menu not made yet" << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/Adam/newGameMenu.hpp b/Adam/newGameMenu.hpp new file mode 100644 index 0000000..b1047cc --- /dev/null +++ b/Adam/newGameMenu.hpp @@ -0,0 +1,26 @@ +#ifndef NEWGAMEMENU_HPP +#define NEWGAMEMENU_HPP + +#include "menu.hpp" + +#define newGameTiles 5 + +class newGameMenu : public Menu +{ +private: + float width; + float heigth; + sf::Font font; + sf::Text menuChoices[newGameTiles]; +public: + newGameMenu(float width, float heigth, Character & player); + + void draw(sf::RenderWindow & window, sf::View & main_camera, sf::Sprite & bgMain, Character & player) override; + void moveUp() override; + void moveDown() override; + int chooseTile(std::shared_ptr & currentMenu, Character & player, sf::Window & window, AnimationManager & ani) override; +}; + + + +#endif NEWGAMEMENU_HPP diff --git a/Adam/npc.cpp b/Adam/npc.cpp new file mode 100644 index 0000000..fdeb6e5 --- /dev/null +++ b/Adam/npc.cpp @@ -0,0 +1,109 @@ +#include "pch.h" +#include "npc.hpp" + +npc::npc(sf::Vector2f position, sf::Vector2f scale, std::map animations, sf::Vector2f velocity, statistic health_c) : + Animateable(animations), + movable(position, scale, animations["IDLEright"].textures[0], velocity), + originPosition(position) +{ + speach.dialogue = {"...", "this is standard text", "the devs were lazy", "no muny? "}; + health = health_c; + if (!font.loadFromFile("fonts/stranger.ttf")) + { + std::cout << "error loading font" << std::endl; + } + text.setFont(font); + text.setOutlineColor(sf::Color::Black); + text.setOutlineThickness(2.0f); + text.setScale(sf::Vector2f(0.1, 0.1)); + text.setCharacterSize(200); +} + + +npc::~npc() +{ +} + +void npc::updateState() { + int chance = rand(); + if (chance % 1000 < 5) { + if (state == STATE::IDLE) { + state = STATE::WALKING; + walkTheOtherWay(); + } else if (state == STATE::WALKING) { + state = STATE::IDLE; + } + } +} + +void npc::setText(std::string str) { + text.setString(str); +} + +void npc::setDialogue(std::vector & dia) { + speach.dialogue = dia; +} + +void npc::showText(Character &p) { + sf::Vector2f plPos = p.getPosition(); + if (plPos.x - position.x < 50 && plPos.x - position.x > -50) { + // speach.updateLine(); + setText(speach.line()); + } + else { + speach.reset(); + setText(""); + } +} + +void npc::updateText() { + speach.updateLine(); +} + + +bool npc::isWalking() { + return state != STATE::IDLE; +} + +void npc::walkTheOtherWay() { + if (current_direction == direction::LEFT) { + current_direction = direction::RIGHT; + // std::cout << "moving the other way, right \n"; + setScale(sf::Vector2f(0.2, 0.2)); + + } + else if (current_direction == direction::LEFT) { + current_direction = direction::RIGHT; + setScale(sf::Vector2f(-0.2, 0.2)); + + } +} + +int npc::getDirection() { + if (current_direction == direction::LEFT) { + return -1; + } else if (current_direction == direction::RIGHT) { + return 1; + } + return 0; +} + +void npc::draw(sf::RenderTarget & w) { + drawable::draw(w); + text.setPosition(sf::Vector2f(getPosition().x, getPosition().y - 10)); + w.draw(text); +} + +std::string npc::linearDialogue::line(){ + std::string currentLine = dialogue[index]; + return currentLine; +} + +void npc::linearDialogue::updateLine() { + index++; + if (index >= dialogue.size()) index = 0; +} + +void npc::linearDialogue::reset() { + index = 0; +} \ No newline at end of file diff --git a/Adam/npc.hpp b/Adam/npc.hpp new file mode 100644 index 0000000..b0abceb --- /dev/null +++ b/Adam/npc.hpp @@ -0,0 +1,38 @@ +#pragma once +#include "Movable.h" +#include "Animated.hpp" +#include "statistic.h" +#include "Character.h" +#include + +class npc : public movable, public Animateable{ + statistic health; + enum class STATE {IDLE, FOLLOWING, WALKING}; + STATE state = STATE::IDLE; + sf::Font font; + sf::Text text = sf::Text(); + struct linearDialogue { + std::vector dialogue; + int index = 0; + std::string line(); + void updateLine(); + void reset(); + } speach; +public: + int lastDirection; + sf::Vector2f originPosition; + npc(sf::Vector2f position, sf::Vector2f scale, std::map animations, sf::Vector2f velocity, statistic health_c = statistic(100, 100)); + npc() {} + ~npc(); + void updateState(); + void setText(std::string str); + void setDialogue(std::vector & dia); + void showText(Character &p); + void updateText(); + bool isWalking(); + void walkTheOtherWay(); + int getDirection(); + void draw(sf::RenderTarget & w); + +}; + diff --git a/Adam/pch.cpp b/Adam/pch.cpp new file mode 100644 index 0000000..1730571 --- /dev/null +++ b/Adam/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" \ No newline at end of file diff --git a/Adam/pch.h b/Adam/pch.h new file mode 100644 index 0000000..078fbfc --- /dev/null +++ b/Adam/pch.h @@ -0,0 +1,20 @@ +#pragma once + +#include "SFML/Graphics.hpp" +#include "SFML/Audio.hpp" + +#include "Windows.h" + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include diff --git a/Adam/physics.cpp b/Adam/physics.cpp new file mode 100644 index 0000000..f0cb9ec --- /dev/null +++ b/Adam/physics.cpp @@ -0,0 +1,84 @@ +#include "pch.h" +#include "physics.h" + +namespace Adam +{ + physics::physics(movable* player, collision_handler & clh_in) + { + moveables.push_back(player); + clh = &clh_in; + } + + physics::~physics() + { + } + + physics::physics() {} + + void physics::step_x_moveables() + { + for (auto & moveable : moveables) + { + moveable->move(sf::Vector2f(moveable->getVelocity().x, 0)); + } + + for (auto & moveable : moveables) + { + //handle collision for every moveable with the world + clh->handle_collision(clh->collides_with_world(moveable), + [&]() + { + moveable->move(sf::Vector2f(-moveable->getVelocity().x, 0)); + moveable->setVelocity(sf::Vector2f(0, moveable->getVelocity().y)); + }); + + //handle collision for current moveable with every other moveable + for (auto & other_moveable : moveables) + { + if (moveable == other_moveable) continue; + + clh->handle_collision(clh->collides_with_sprite(moveable->getBox(), other_moveable->getBox()), + [&]() + { + moveable->move(sf::Vector2f(-moveable->getVelocity().x, 0)); + moveable->setVelocity(sf::Vector2f(0, moveable->getVelocity().y)); + }); + } + } + } + + void physics::step_y_moveables() + { + for (auto & moveable : moveables) + { + moveable->move(sf::Vector2f(0, moveable->getVelocity().y)); + } + + for (auto & moveable : moveables) + { + if (clh->handle_collision(clh->collides_with_world(moveable) && moveable->getVelocity().y > 0, + [&]() { + while (clh->collides_with_world(moveable)) + { + if (!moveable->canJump) { moveable->canJump = true; moveable->jumpCount = 0; } + moveable->move(sf::Vector2f(0, -1)); + } + moveable->setVelocity(sf::Vector2f(moveable->getVelocity().x, 0)); + })) continue; + + if (clh->handle_collision(clh->collides_with_world(moveable) && moveable->getVelocity().y < 0, + [&]() { + while (clh->collides_with_world(moveable)) + { + moveable->move(sf::Vector2f(0, 1)); + } + moveable->setVelocity(sf::Vector2f(moveable->getVelocity().x, 0)); + })) continue; + + moveable->setVelocity(moveable->getVelocity() + gravity); + + + + } + } +} \ No newline at end of file diff --git a/Adam/physics.h b/Adam/physics.h new file mode 100644 index 0000000..7ed1c11 --- /dev/null +++ b/Adam/physics.h @@ -0,0 +1,47 @@ +/// @file + +#pragma once +#include "Character.h" +#include "Movable.h" +#include "collision_handler.h" + +//! Apparently I'm the only one who actually uses this namespace :) +namespace Adam +{ + /// \brief + /// Physics class + /// \details + /// Object that handles all movables movement and collision for the game. + /// Uses a collision_handler to bind actions to collision detection. + /// Collision detection is done using code provided by SFML on their github page, + /// these functions check for pixel perfect overlap of bitmasked textures. + /// We seperate X and Y axis movement, so we can fix the overlap according to the axis we collided. + class physics + { + public: + collision_handler * clh; //pointer to its' collision_handler + std::vector moveables; /*!< Vector of pointers to every movable in the game. */ + sf::Vector2f gravity = sf::Vector2f(0, 1); /*!< Fixed gravity vector. */ + + //empty default constructor + physics(); + + /// \brief + /// Physics class constructor + /// \details + /// For now, adds only the player object to moveables. Other movables are later manually pushed back. + physics(movable* player, collision_handler & clh_in); + ~physics(); + + /// \details + /// Applies every movables' x velocity then checks and handles collision cases. + /// Overlap fixing is done by moving the sprite back on the collision axis until it's no longer colliding. + void step_x_moveables(); + + /// \details + /// Applies every movables' y velocity then checks and handles collision cases. + /// Overlap fixing is done by moving the sprite back on the collision axis until it's no longer colliding. + void step_y_moveables(); + }; +} + diff --git a/Adam/projectile.cpp b/Adam/projectile.cpp new file mode 100644 index 0000000..5cf268e --- /dev/null +++ b/Adam/projectile.cpp @@ -0,0 +1,35 @@ +#include "pch.h" +#include "projectile.hpp" + +projectile::projectile(sf::Vector2f position, sf::Vector2f scale, std::map & animations, sf::Vector2f velocity, float dmg = 0): + movable(position, scale, animations["FIREBALLright"].textures[0], velocity), + Animateable(animations), + dmg(dmg) +{ + death = false; +} + + + +void projectile::setDamage(float dmg) { + dmg = dmg; +} + +void projectile::setLive(int newLive) { + live = newLive; +} + +float projectile::getDamage() { + return dmg; +} + +void projectile::updateLive(int minus){ + live -= minus; + if (live <= 0) { + death = true; + } +} + +bool projectile::isDeath() { + return death; +} \ No newline at end of file diff --git a/Adam/projectile.hpp b/Adam/projectile.hpp new file mode 100644 index 0000000..8d9129d --- /dev/null +++ b/Adam/projectile.hpp @@ -0,0 +1,19 @@ +#pragma once +#include "Movable.h" +#include "Animated.hpp" + +class projectile : public movable, public Animateable { +private: + float dmg; + bool death = true; + int live = 50; +public: + projectile() {} + projectile(sf::Vector2f position, sf::Vector2f scale, std::map & animations, sf::Vector2f velocity, float dmg); + void setDamage(float dmg); + void setLive(int newLive); + float getDamage(); + void updateLive( int minus = 1); + bool isDeath(); + +}; \ No newline at end of file diff --git a/Adam/statistic.cpp b/Adam/statistic.cpp new file mode 100644 index 0000000..54f6831 --- /dev/null +++ b/Adam/statistic.cpp @@ -0,0 +1,78 @@ +#include "pch.h" +#include "statistic.h" + + +statistic::statistic(int max, int current) : + max(max), + current(current) +{ + +} + +statistic::statistic() +{} + +void statistic::set_max(int max_points) + +{ + max = max_points; + current = max_points; +} + +void statistic::add(int points) +{ + current += points; + if (is_max()) + { + current = max; + } +} + +void statistic::sub(int points) +{ + current -= points; + if (is_zero()) + { + current = 0; + } +} + +void statistic::zero() +{ + current = 0; +} + +int statistic::is_zero() +{ + if (current <= 0) + { + return true; + } + else + { + return false; + } +} + +int statistic::is_max() +{ + if (current >= max) + { + return true; + } + else + { + return false; + } +} + +void statistic::update_max(int points) +{ + set_max(max + points); + +} + +void statistic::print() +{ + std::cout << "current: " << current << ", max: " << max << '. \n'; +} diff --git a/Adam/statistic.h b/Adam/statistic.h new file mode 100644 index 0000000..41e9b2f --- /dev/null +++ b/Adam/statistic.h @@ -0,0 +1,82 @@ +#pragma once +#include "pch.h" +///@file + +/// \brief +/// statistic +/// \details +/// A variable with a max & current value. +class statistic +{ +private: + + sf::Font font; + sf::Text text; + +public: + int max = 100; + int current = 100; + + /// \brief + /// constructor + /// \details + /// The constructor does initialize the current & max value. + statistic(int max, int current); + + /// \brief + /// empty constructer + /// \details + /// The constructor does not initialize the current & max value. + statistic(); + + /// \brief + /// set the max value + /// \details + /// Set max value of the variable and sets current value to max. + void set_max(int max_points); + + /// \brief + /// add value to current value + /// \details + /// Add value to the current value and checks if the current value is not higher then max. + void add(int points); + + /// \brief + /// subtract value of current value + /// \details + /// Subtract value form current value and checks if the current value is not lower then zero. + void sub(int points); + + /// \brief + /// set current value to zero + /// \details + /// Sets the current value of a variable to 0. + void zero(); + + /// \brief + /// check if value is zero + /// \details + /// Checks if current value of the variable is equal or lower then 0. + int is_zero(); + + /// \brief + /// check if value is max + /// \details + /// Checks if current value of the variable is equal or higher then the max value. + int is_max(); + + /// \brief + /// update max value + /// \details + /// Updates the max value of the variable without updating the current value. + void update_max(int points); + + /// \brief + /// print variable + /// \details + /// Prints the current value & max value. + void print(); + +}; + + diff --git a/Adam/tools/generate_factory_file.py b/Adam/tools/generate_factory_file.py new file mode 100644 index 0000000..8b6216e --- /dev/null +++ b/Adam/tools/generate_factory_file.py @@ -0,0 +1,84 @@ +import os +import re +def get_wd(): + wd = input("Enter a path to the directory to scan:") + if os.path.isdir(wd): + return wd + return None + + +def getListOfFiles(dirName): + # create a list of file and sub directories + # names in the given directory + listOfFile = os.listdir(dirName) + allFiles = list() + # Iterate over all the entries + for entry in listOfFile: + # Create full path + fullPath = os.path.join(dirName, entry) + # If entry is a directory then get the list of files in this directory + if os.path.isdir(fullPath): + allFiles = allFiles + getListOfFiles(fullPath) + else: + allFiles.append(dirName+entry) + + return allFiles + + +def split_uppercase(str): + x = '' + i = 0 + for c in str: + # print(c, str[i-1]) + if i == 0: + x += c + elif c.isupper() and not str[i-1].isupper(): + x += ' %s' % c + else: + x += c + i += 1 + return x.strip() + + + +def atoi(text): + return int(text) if text.isdigit() else text + +def natural_keys(text): + ''' + alist.sort(key=natural_keys) sorts in human order + http://nedbatchelder.com/blog/200712/human_sorting.html + (See Toothy's implementation in the comments) + ''' + return [ atoi(c) for c in re.split('(\d+)', text) ] + +alist=[ + "something1", + "something12", + "something17", + "something2", + "something25", + "something29"] + + + +if __name__ == '__main__': + wd = get_wd() + while wd is None: + wd = get_wd() + files = getListOfFiles(wd)[1:] + files.sort(key=natural_keys) + print(files) + target_file = 'C:/ti-software/Adam/Adam/assets/animations/animations.txt' + base_path = 'animations/' + with open(target_file, 'w+') as f: + for file in files: + split_name = split_uppercase(file).split('\\') + # split_name.append(split_name[1].split('(')[0]) + split_name = split_name[6].split(' ') + print(split_name) + line = '' + line += split_name[0] + ' ' + split_name[1] + ' ' + line += base_path + split_name[0] + split_name[1] + '/' + split_name[2] + line += "\n" + f.write(line) \ No newline at end of file diff --git a/Adam/tools/rename.py b/Adam/tools/rename.py new file mode 100644 index 0000000..f5a10ca --- /dev/null +++ b/Adam/tools/rename.py @@ -0,0 +1,28 @@ +import os +from os import listdir +from os.path import isfile, join + + +def get_wd(): + wd = input("Enter a path to the directory to scan:") + if os.path.isdir(wd): + return wd + return None + + +def remove_whitespace_from_name(dir): + for path, folders, files in os.walk(dir): + for f in files: + os.rename(os.path.join(path, f), os.path.join(path, f.replace(' ', ''))) + for i in range(len(folders)): + new_name = folders[i].replace(' ', '') + os.rename(os.path.join(path, folders[i]), os.path.join(path, new_name)) + folders[i] = new_name + + +if __name__ == '__main__': + wd = get_wd() + while wd is None: + wd = get_wd() + remove_whitespace_from_name(wd) + diff --git a/Adam/tools/resize_images.py b/Adam/tools/resize_images.py new file mode 100644 index 0000000..1bb62ba --- /dev/null +++ b/Adam/tools/resize_images.py @@ -0,0 +1,34 @@ +import PIL +import os +from os import listdir +from os.path import isfile, join + +from PIL import Image + + +def get_wd(): + wd = input("Enter a path to the directory to scan:") + if os.path.isdir(wd): + return wd + return None + + +def resize_images(dir): + for path, folders, files in os.walk(dir): + for f in files: + if f != 'animations.txt': + basewidth = 192 + img = Image.open(os.path.join(path, f)) + wpercent = (basewidth / float(img.size[0])) + hsize = 192 + img = img.resize((basewidth, hsize), PIL.Image.ANTIALIAS) + img.save(os.path.join(path, f)) + + + +if __name__ == '__main__': + wd = get_wd() + while wd is None: + wd = get_wd() + resize_images(wd) +