using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hello : MonoBehaviour
{
public int number = 10;
public string helloMessage = "hi.nihao";
public float speed = 1.2f;
//可以在Inspector窗口中直接设置
//只有在public属性才能在Inspector里显示,且Inspector里可以修改初始值
//也可以添加引用类型的属性,如图片资源、游戏对象、组件
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
//向上移动功能
transform.Translate(0, speed * Time.deltaTime, 0);
}
}