CompareTag
SuperWall
ChangeDir
CompareTag
SuperWall
ChangeDir
rayDistance
private void OnDrawGizmos()
Gizmos.DrawLine(transform.position,transform.position+new Vector3(0,1,0)
layermask
.color = Color.red
List<int>dirList = new List<int>();
dirList.Add(0);
int id = Random.Range(0, dirList.Count);
dirList[id]
CreateEnemy
ontriggerEnter2D(Collider2D collision)
Physics2D.Raycast(transform.position,
MovePosition(transform.position+)
switch(dir)
case 0;
default:
break;
Vector2 dirVector
Range(0, 4))
Move
transform.position += new Vector3(h, v) * speed;
GameController
Instantiate(playerPre,
Component
Input.GetAxis("Horizontal")
Vertical
Animator anim;
anim=GetComponent<Animator>
Project Settings
Input
Horizontal
Vertical
New Sprite
int count=Random.Range(0,2+
Instantiate
Unpack Prefab
private void CreateDoor()
int index=Random.Range(0,nullPointsList.coun
Instantiate()
CreateWall
Instantiate()
GameObject wall =
wallPre, transform
wall.transform.position=
Vector2 pos=
int index=Random.Range()
if (wallCount >=
FindNullPoints()
nullPointsList = new List<Vector2>();
Debug.log(.Count
Scripts
MapController
InitMap
CreatSuperWall
GameObject superWallPre;
Instantiate(superWallPer,transform
GameObject wall = Instantiate(
wall.transform.position=newVecttor3(x,y)
将project Settings里的time中的time scale变成0这样游戏就停止不能运行了。如:Time.timeScale = 0;
刷新ui
foreach (var item in collection){}
如果想要将2D的角色的上下顺序改变,只需要将Sprite Renderer下的Order in Layer