新建 文本文档 (2).txt

来自「成熟的RPG引擎,Flysky发布. 斜视角引擎.」· 文本 代码 · 共 35 行

TXT
35
字号
		//最新的做法
		// |----------------
		// |       |    1  |
		// |-------0-------|
		// |       |       |
		// |---------------|
        //

		/*第一种做法:(早已不用)
		if (tx>=135&&tx<180){for(int i=0;i<role.RLS;i++) role.role[i].face=LUFace;}
		else if (tx>=45&&tx<90) {for(int i=0;i<role.RLS;i++) role.role[i].face=RUFace;}
		else if (tx>=225&&tx<270){for(int i=0;i<role.RLS;i++) role.role[i].face=LDFace;}
		else if (tx>=315&&tx<360){for(int i=0;i<role.RLS;i++) role.role[i].face=RDFace;}
		else if (tx>=180&&tx<225){for(int i=0;i<role.RLS;i++) role.role[i].face=LeftFace;}
		else if (tx>=0&&tx<45) {for(int i=0;i<role.RLS;i++) role.role[i].face=RightFace;}
		else if (tx>=90&&tx<135){for(int i=0;i<role.RLS;i++) role.role[i].face=UpFace;}
		else if (tx>=270&&tx<315){for(int i=0;i<role.RLS;i++) role.role[i].face=DownFace;}
		*/
		//允许斜线运动
		/* 第二种做法:(设计有缺陷)
			#ifdef _AStarD
		if (tx<64&&ty<64) {for(int i=0;i<role.RLS;i++) role.role[i].face=LUFace;}
		else if (tx>64&&ty<64) {for(int i=0;i<role.RLS;i++) role.role[i].face=RUFace;}
		else if (tx<64&&ty>64) {for(int i=0;i<role.RLS;i++) role.role[i].face=LDFace;}
		else if (tx>64&&ty>64) {for(int i=0;i<role.RLS;i++) role.role[i].face=RDFace;}
		else if (tx<0) {for(int i=0;i<role.RLS;i++) role.role[i].face=LeftFace;}
		else if (tx>0) {for(int i=0;i<role.RLS;i++) role.role[i].face=RightFace;}
	   	else if (ty<0) {for(int i=0;i<role.RLS;i++) role.role[i].face=UpFace;}
		else if (ty>0) {for(int i=0;i<role.RLS;i++) role.role[i].face=DownFace;}		
		#else
		if (tx<0) {for(int i=0;i<npc.RLS;i++) npc.npc[i].face=LeftFace;}
		else if (tx>0) {for(int i=0;i<npc.RLS;i++) npc.npc[i].face=RightFace;}
	   	else if (ty<0) {for(int i=0;i<npc.RLS;i++) npc.npc[i].face=UpFace;}
		else if (ty>0) {for(int i=0;i<npc.RLS;i++) npc.npc[i].face=DownFace;}
		#endif*/

⌨️ 快捷键说明

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