这两天通过视频,了解一下C#的基本用法,C#看起来语法和java差不多,还没有仔细研究,这是跟着视频做的第一个DEMO
using System;
namespace myfristgame
{
class MainClass
{
public static void Main (string[] args)
{
//游戏启动时候初始化值
//常量只能给常量,能给变量或者表达式 否则会报错
//const int MapViewX = Convert.ToInt32 ("20");
const int MapViewX = 16;
const int MapViewY = 46;
bool isStart = true;
const int EmptyLine = 0;
const int TBLine = 1;
const int LRLine = 2;
const int Player = 3;
int playerPosX = 1;
int playerPosY = 1;
int playerOldPosX = 1;
int playerOldPosY = 1;
//地图数据
int[,]mapData = new int[MapViewX,MapViewY];
//初化地图数据
for(int i = 0;i<MapViewX;i++){
for(int j = 0;j<MapViewY