したいのですが、以下のようなエラーが出て、うまくいきません。何が原因かわかる方がいらしたら、教えてください
1>PlayScene.obj : error LNK2001: 外部シンボル ""class MenuList * menulist" (?menulist@@3PAVMenuList@@A)" は未解決です。
1>C:\Users\masakimatuura\Downloads\passer\Debug\GameProg.exe : fatal error LNK1120: 外部参照 1 が未解決です。
globals.h
#pragma once
const int p_Speed = 2;
const int hn_speed = 17;
const int shot_max = 100;
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int MAP_HEIGHT = 30;
const int MAP_WIDTH = 120;
const int MapChip_Size = 32;
const int CHAR_SIZE = 32;
const int MAP_NUM = 1;
#include "GameScene.h"
#include "PlayScene.h"
#include "TitleScene.h"
#include "GameOverScene.h"
#include "StageManeger.h"
#include "Stage1.h"
#include "Stage2.h"
#include "Stage3.h"
#include "MenuManager.h"
#include "MenuList.h"
extern GameScene *currentScene;
extern PlayScene *playScene;
extern TitleScene *titleScene;
extern GameOverScene *gameoverScene;
extern StageManeger *currentStage;
extern Stage1 *st1;
extern Stage2 *st2;
extern Stage3 *st3;
extern MenuManager *currentmenu;
extern MenuList *menulist;
#pragma once
class MenuManager
{
public:
virtual void list_draw() = 0;
virtual void list_update() = 0;
};
#pragma once
#include "MenuManager.h"
class MenuList : public MenuManager
{
int m_graph;
public:
MenuList();
void list_draw();
void list_update();
};
#include "DxLib.h"
#include "Globals.h"
//#include "MenuList.h"
MenuList::MenuList()
{
m_graph = LoadGraph("passer画像/hana2.png");
}
void MenuList::list_draw()
{
DrawGraph(0, 0, m_graph, TRUE);
DrawFormatString(2, 5, GetColor(255, 255, 255), "アイテム");
DrawFormatString(2, 15, GetColor(255, 255, 255), "セーブ");
DrawFormatString(2, 30, GetColor(255, 255, 255), "ゲーム終了");
DrawFormatString(2, 45, GetColor(255, 255, 255), "装備");
DrawFormatString(2, 45, GetColor(255, 255, 255), "地図");
DrawFormatString(2, 45, GetColor(255, 255, 255), "ミッション一覧");
}
void MenuList::list_update()
{
if(CheckHitKey(KEY_INPUT_P)){
list_draw();
}
}
#include "Globals.h"
PlayScene::PlayScene() //PlaySceneで呼び出されている、PlayScene関数の処理定義
{
player = new Player(Point2D(300, 480)); //playerの初期化
enemy = new Enemy(Point2D(0, 0));
mouseCursor = new MouseCursor();
//ステージ初期化
st1 = new Stage1(*player);
st2 = new Stage2(*player);
st3 = new Stage3(*player);
currentStage = st1;
//メニュー画面初期化
menulist = new MenuList();
//currentmenu = menulist;
}
PlayScene::~PlayScene()
{
delete player;
delete enemy;
delete mouseCursor;
delete st1;
delete st2;
delete st3;
delete menulist;
}
void PlayScene::draw() //PlaySceneで呼び出されているdraw関数の処理定義
{
currentStage->draw(*player); //ステージ画像描画
player->draw(*st1); //player画像描画
enemy->draw(); //敵画像描画
player->rePoint();
enemy->rePoint();
}
void PlayScene::update(MouseCursor *mouseCursor)
{
currentStage->next_stage(*player); //現在のnext_stage関数を呼び出す
currentStage->isHitMap(*player);
mouseCursor->move(); //銃カーソルの描画
player->move(mouseCursor, *player); //プレイヤーの移動
player->shot(mouseCursor); //プレイヤーの弾発射
player->isInsector(*enemy); //プレイヤーの敵との当たり判定
enemy->move(); //敵の移動
enemy->isInsector(*player); //敵のプレイやーとの当たり判定
//currentmenu->list_update();
if(CheckHitKey(KEY_INPUT_Q)){
currentScene = gameoverScene;
}
}