type
status
date
slug
summary
tags
category
icon
password
想象一下坐在电脑面前的我,已经是一个独立游戏的开发者了,有很多人热爱我做的游戏,口袋也挣的满满的。
📝 知识点
代码结构
大括号包裹的就做语句块using System namespace Lesson1 //命名空间代码块 { class Program //类代码块 { static coid Main(string[] args) //函数代码块 { Console.WriteLine("你好世界!"); } } }
折叠代码
主要作用是让我们编程时逻辑更加清晰#region #endregion具体作用是可以将中间包裹的代码折叠起来 编辑器提供的预处理指令,只在编辑有用,执行会被自动删除
日志输出
Debug.Log(“你你你”);print("按下空格键: " + Input.GetKeyDown(KeyCode.Space));
按键输入
Input.GetKey(KeyCode.Space);按下松开或持续按下会记录Input.GetKeyDown(KeyCode.Space);按下时记录Input.GetKeyUp(KeyCode.Space);松开时记录
transform
修改属性transform.position;修改位移transform.rotation;修改旋转transform.localScale;修改大小
调用方法transform.Translate(0, 0, 0.1f);可以朝某个方偏移transform.Rotate(0, 1, 0);可以围绕某个轴旋转
🤗 总结归纳
总结文章的内容
📎 参考文章
- Author:王吹风
- URL:https://harry.vfxskill.com/article/7
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!

