1、基本操作演练
在unity asset store中找到所需资源fantasy skybox free
在package manager中打开my assets,下载并导入该资源
为主相机添加skybox组件
添加地形场景
添加画笔
绘制花草
2、牧师与魔鬼动作分离版
在作业3的基础上稍加修改,然后添加移动动画脚本:
public class MoveAnimation : MonoBehaviour
{
public const int DETA = 100;
public int time;
public Entity entity;
public Vector3 speed;
void Start()
{
}
// Update is called once per frame
private void Update()
{
if (entity.move)
{
this.time = DETA;
this.speed = (entity.target - entity.obj.transform.position) / DETA;
entity.move = false;
}
if (time > 0)
{
time--;
entity.obj.transform.position += speed;
}
}
}