学习unity,今天学习试做塔防类游戏
进入unity(推荐2017)
准备资源包
创建项目
搭建游戏场景

调整灯光

设计路线,设定导航点
脚本:WayPointManager
using UnityEngine;
using System.Collections.Generic;
public class WayPointManager : MonoBehaviour {
//1
public static WayPointManager Instance;
//2
public List
void Awake() {
//3
Instance = this;
}
//4
public Vector3 GetSpawnPosition(int pathIndex)
{ return
Paths[pathIndex].WayPoints[0].position;
}
}
//5
[System.Serializable]
public class Path {
public List WayPoints = new List();
}

本文是Unity初学者的学习记录,详细介绍了如何使用Unity 2017创建塔防游戏的初步步骤,包括创建项目、设置导航点、编写WayPointManager脚本、设计塔基布局等。提供了源码分享,为后续添加敌人铺垫。
最低0.47元/天 解锁文章
4403





