3765人加入学习
(18人评价)
Unity初级案例 - 炸弹人

Unity2018.4.7,制作完成于2020.12.27

价格 免费

Scripts

MapController

InitMap

CreatSuperWall

GameObject superWallPre;

Instantiate(superWallPer,transform

GameObject wall = Instantiate(

wall.transform.position=newVecttor3(x,y)

 

[展开全文]

FindNullPoints()

nullPointsList = new List<Vector2>();

Debug.log(.Count

[展开全文]

CreateWall

Instantiate()

GameObject wall = 

wallPre, transform

wall.transform.position=

Vector2 pos=

int index=Random.Range()

if (wallCount >= 

 

[展开全文]

Unpack Prefab

private void CreateDoor()

int index=Random.Range(0,nullPointsList.coun

Instantiate()

 

 

[展开全文]

int count=Random.Range(0,2+

Instantiate

[展开全文]

Input.GetAxis("Horizontal")

Vertical

Animator anim;

anim=GetComponent<Animator>

Project Settings

Input

[展开全文]

GameController

Instantiate(playerPre,

Component

[展开全文]

transform.position += new Vector3(h, v) * speed;

[展开全文]

MovePosition(transform.position+)

switch(dir)

case 0;

default:

break;

Vector2 dirVector

Range(0, 4))

Move

 

[展开全文]

ontriggerEnter2D(Collider2D collision)

Physics2D.Raycast(transform.position,

[展开全文]

List<int>dirList = new List<int>();

dirList.Add(0);

int id = Random.Range(0, dirList.Count);

dirList[id]

CreateEnemy

 

[展开全文]

private void OnDrawGizmos()

Gizmos.DrawLine(transform.position,transform.position+new Vector3(0,1,0)

layermask

.color = Color.red

[展开全文]

private SpriteRenderer spriteRenderer;

GetComponent<Rigidbody2D>();

private Color color;

[展开全文]

IEnumerator Tnjured(int time)

WaitForSeconds(0.25f);

StartCoroutine("")

[展开全文]

CreateBomb

Input.GetKeyDown(KeyCode.Space)

Instantiate

transform

bomb.transform.position=new Vector3(Mathf.RoundToInt(transform.position.x),

[展开全文]

授课教师

SiKi学院老师

课程特色

下载资料(1)
视频(66)