南瓜鬼脸 (Unity)


这几天做了一个特别简单的案例,万圣节南瓜鬼脸。

        怎么说呢,我第一次接触Unity,给我的感觉还不错。从这个案例中我学到了很多东西。

         我要做一个总结

              万圣节鬼脸的建立:

                                     1:创建sprite。<也就是导入sprite>

                                     2:整理画面,调整镜头。

                                     3:让bat抖动,接着对所有的sprite加入淡入效果,最后就是流程控制。<自己也当了导演!>

              粒子系统

                       学会了材质的创建,加入,以及粒子各个功能的调整。

               代码:

                      Vector3<官网上找的>

                       Descriptation

                       Representation of 3D vectors and points.

                      This structure is used throughout Unity to pass 3D positions and directions around.It also contains functions for doing common vector operations.

                      Besides the functions listed below, other classes can be used to manipulate vectors and points as well.For example the Quaternion and the Matrix4x4 classes are useful  for rotating or transforming vectors and points.< x , y , z >.

                      var

                      var 是一种弱化类型的定义,定义了这个类型,编译器会自动判断该变量的类型。必须是这个形式var m = "asd" ,之后就无法给变量赋初始值类型不同的值了。这个变量是局部变量。

                      Time.deltaTime(The time in seconds it took to complete the last frame (Read Only).)<每一帧完成的秒数>

                       If you add or subtract to a value every frame chances are you should multiply with Time.deltaTime. When you multiply with Time.deltaTime you essentially express: I want to move this object 10 meters per second instead of 10 meters per frame.

                       GetComponent 我理解是获取内部的一个结构 ep.:GetComponent<spriteRanderer>获取sprite渲染器

                        transform:Every object in a scene has a Transform.It's used to store and manipulate the position, rotation and scale of the object

                         它被使用来储存和处理物体位置,旋转,物体的规模。ep.:var pos = transform.position;pos.x...............pos.y;

                       GameObject  :  Base class for all entities in Unity scenes.游戏里个体的基础集合。ep.:sp.SerActive(false);

                       Input.GetmouseButtonup(0),0代表鼠标左键。



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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值