《符文冲突》unity塔防类游戏试做,经验源码分享-1

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

学习unity,今天学习试做塔防类游戏

进入unity(推荐2017)
准备资源包
创建项目
搭建游戏场景
如图
调整灯光
在这里插入图片描述
设计路线,设定导航点
脚本:WayPointManager
using UnityEngine;
using System.Collections.Generic;
public class WayPointManager : MonoBehaviour {
//1
public static WayPointManager Instance;
//2
public List Paths = new 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();
}

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值