22149人加入学习
(189人评价)
Unity2D 官方入门案例 - Ruby's Adventure

制作完成于2020年5月5日,基于Unity2019.3

价格 免费

(轴向输入)float horizontal=(类名和方法名)Input.GetAxis(横轴)("Horizontal");

float Vertical=Input.GetAxis("Vertical");

Vector2 (变量)position=(ruby的位置)transform.position;

position.x(横轴)=position.x+0.1f*(自身位置)horizontal*(按每秒一米的速度移动)Time.deltaTime;

position.y(y轴)=position.y+0.1f*(自身位置)vertical*(按每秒一米的速度移动)Time.deltaTime; 

tansform.position=position;(确认赋值给它)

 

 


      float horizontal = Input.GetAxis("Horizontal");
        float vertical = Input.GetAxis("Vertical");
        Vector2 position = transform.position;
        position.x = position.x + 0.1f * horizontal*Time.deltaTime;
        position.y = position.y + 0.1f * vertical*Time.deltaTime;
        transform.position = position;

[展开全文]

float horizontal=Input.GetAxis("Horizontal")

Debug.Log(Horizontal)

[展开全文]

层级面板(场景面板):用于显示该场景下的游戏物体与其父子关系

场景:展示游戏情节的舞台界面,如舞台剧中的不同幕

游戏物体:场景中的个体

fu

[展开全文]

舞品放在主摄像机里才可以看到

 

 

[展开全文]

静态方法 全局调用

成员变量方法 普通方法

 

[展开全文]

為社麽collision不能直接調用getcomponent?
怎麽解決?

爲什麽if對象就是gameobject;

[展开全文]

草莓动画的实现给动画编辑器添加一个缩放并设置三个关键帧来实现q版草莓的动画

 

[展开全文]

1.定义一个布尔变量控制,用来控制胜利的音效的一次性的播放。

2.定义一个3向量用来存储主角初始的位置,创建一个函数用来初始化主角的位置并把生命值设置成0。当主角生命为0就要让主调用初始化函数。

[展开全文]

audiosource组件可以存放audioclip音频文件

 

[展开全文]

GeNa Pro is a sophisticated level design system that enables you to rapidly and intuitively populate your scenes. Born from years of commercial work, GeNa Pro can populate and shape terrains, spawn anything that can be added to a Unity scene, determine the best places to create and spawn villages and connect them with roads, and can also create roads and rivers and other sophisticated structures along splines. GeNa Pro is at ease at runtime as it is at design time, and was designed with API control and extensibility in mind, so you can both extend GeNa Pro and embed it into your own solutions. GeNa Pro is integrated with Gaia Pro, so that it is simple and fast to create environments that 'just work', and comes with sample spawner content packs for Gaia Pro and the free Flooded Grounds asset, so you can be up and running around in your own levels within minutes.

[展开全文]