Discuz! Board

 找回密码
 立即注册
查看: 392|回复: 0

墙体初始化

[复制链接]

574

主题

758

帖子

243万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2435189

烈空座 Lv:100
发表于 2022-12-8 19:11:53 | 显示全部楼层 |阅读模式
[C] 纯文本查看 复制代码
#include <graphics.h>//包含EGE的头文件
#include <time.h> //包含随机数,时间函数
#include <bits/stdc++.h> 
//#include <stdlib.h>
using namespace std;
 
char ch;
int width,height;//界面宽和高 
int wall_w,wall_h;//障碍物宽和高 
int wall_pass;//障碍物间的缺口长度 
int score,score_flag;

struct ballon{
	float x;//x坐标
	float y;//y坐标 
	float vx;//x向速度 
	float vy;//y向速度 
	int radius;//半径 
	float g;//加速度 
}ball; 

struct wall{
	int xr;//左上x坐标
	int yr;//左上y坐标 
	int xl;//右下x坐标
	int yl;//右下y坐标 y
	int vx;//x向速度 
}wall[4],wall_t;


bar(wall[i].xl,wall[i].yl,wall[i].xr,wall[i].yr); 


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|DiscuzX

GMT+8, 2025-2-12 18:33 , Processed in 0.050531 second(s), 28 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.. 技术支持 by 巅峰设计

快速回复 返回顶部 返回列表