Files
fissh/src/Fish.h
2025-05-22 21:59:49 -04:00

33 lines
643 B
C++

#pragma once
#include "Entity.h"
#include "assets/FishAssets.h"
#include <array>
class Fish : public Entity {
private:
struct FishAssetRef {
int index;
FishAsset &asset;
};
Fish(const FishAssetRef &ref);
static bool initialized;
const std::vector<std::string> &image;
std::vector<std::string> &mask;
static constexpr std::array<char, 12> availableColors = {
'c', 'C', 'r', 'R', 'y', 'Y', 'b', 'B', 'g', 'G', 'm', 'M'};
const float speed;
static FishAssetRef getRandomFishAsset();
static void initializeFishAssets();
void randomizeMask();
public:
Fish();
void update();
void draw(int layer);
};