数据库语言和unity技术

1.数据库语言


主键约束: alter  table  people  add  constraint  pa_people  primary  key  (name)

 

唯一键约束: alter  table  people  add  constraint  ps_people  unique(id)

 

默认键约束: alter  table  people  add  constraint  po_people  default(‘女’)  for  sex

 

检查键约束: alter  table  people  add  constraint  pk_people  check(age>=10 and  age<=40)

 

外键约束:  alter table  people  drop  constraint  pw_people

          Foreign  key (id)  references  users (name)

 

添加一列:alter  table  people  add  password  varchar(10)  null

 

更新一列:alter  table  people  add  password  carcjar(5)  null


2.自动寻径的种类


 MMO-Massively  Multiplayer Online,大型多人在线

策略类或战略类(MMOSLG

动作类(MMOACT)

冒险类(MMOAVG

模拟类游戏(MMOSG

运动类(MMOSPT)

赛车类(MMORPG)

角色扮演类(MMORPG


3.巨魔的自动寻径


1.创建地形.

2.添加角色.

3.创建多个障碍物,尽量摆的复杂一点,来检查Navmesh的可用性和效率.

4.选中地形,在Navigation窗口中,设置Navigation Static.

5.依次选中障碍物,在avigation窗口中,设置Navigation Static.

6.Navigation窗口中,选择Bake(烘培)界面,点击Bake按钮,进程场景烘培,就可以烘.培出寻路网格了.

7.为角色添加NavMeshAgent组件。COMponent->Navigation->NavMeshAgent..

8.为角色新增一个脚本PlayerController.cs,实现点击目标,自动寻路功能.

声明:此篇文档时来自于【狗刨学习网】社区-unity极致学院,是网友自行发布的Unity3D学习文章,如果有什么内容侵犯了你的相关权益,请与官方沟通,我们会即时处理。

4.自动寻径脚本编写


[code] Void start()

{

Anent=GetComponent<NarmeshAgent();

}

Void Updata

{

RaycastHit hitInfo:

If(Input.Get MouseButtonDown(0))

{

 Ray  ray=camera  main.screen point Ray(Input.mousePosition);

If(Input.Get MouseButtonDown(0))

{

agent.set.Destioation(hitinifo.point);

      }

   }

} [/code]


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值