10 enemies in demo

This commit is contained in:
h4570
2022-08-12 23:40:26 +02:00
parent 2054dba4ec
commit 8829bf3035
23 changed files with 596 additions and 224 deletions
@@ -0,0 +1,43 @@
/*
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#pragma once
#include "states/game/terrain/heightmap.hpp"
#include "./enemy.hpp"
#include <tyra>
#include <vector>
using Tyra::DynamicMesh;
using Tyra::Engine;
using Tyra::Texture;
using Tyra::TextureRepository;
using Tyra::Vec4;
namespace Demo {
class EnemyManager {
public:
EnemyManager(Engine* engine, const Heightmap& heightmap);
~EnemyManager();
void update(const Heightmap& heightmap, const Vec4& playerPosition);
std::vector<RendererDynamicPair*> getPairs() const;
private:
TextureRepository* textureRepo;
std::vector<Enemy*> enemies;
DynamicMesh* motherMesh;
Texture* bodyTexture;
Texture* clothTexture;
};
} // namespace Demo