⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 teleport.cpp

📁 一个三维打斗游戏
💻 CPP
字号:
// (C) Copyright 1996-1997 by Anthony J. Carin.  All Rights Reserved.

#include "stdafx.h"
#include "teleport.h"
#include "levels.h"


extern CString& getpath(CString& filename);

Teleporter::Teleporter(short Level)
			: landscape((CString)"landscpe\\teleport.img")
{
    m_type = TELEPORTER;
    mLevelNum = Level;
}

void Teleporter::draw()
{
	baseobject::draw();
#ifdef EDITOR
    if (Game->LevelPtr()->selection)
        return;
#else
    setcolor(RGB(random(256), random(256), random(256)));
#endif
    if (Game->LevelPtr()->GuyLocation().distanceto(location()) < .5f)
    {
        Game->Landscapes()->save();
        Game->LevelPtr()->NewLevel();
        Game->SetLevelNum((short)(mLevelNum-1));
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -