ZERO_BEYOND

博客园 首页 联系 订阅 管理
  56 随笔 :: 0 文章 :: 1 评论 :: 15298 阅读

05 2023 档案

摘要:1 //读取 2 FileStream rfs = new FileStream(@"x:\xxx\xxx.xxx", FileMode.Open, FileAccess.Read); 3 //写入 4 FileStream wfs = new FileStream(@"x:\xxx\xxx.xxx 阅读全文
posted @ 2023-05-19 04:29 ZERO_BEYOND 阅读(16) 评论(0) 推荐(0) 编辑

摘要:1 private void OnMouseDown() 2 { 3 print("在xxx身上按下了鼠标"); 4 } 5 6 private void OnMouseUp() 7 { 8 print("在xxx身上按下的鼠标抬起了"); 9 } 10 11 private void OnMous 阅读全文
posted @ 2023-05-09 19:35 ZERO_BEYOND 阅读(61) 评论(0) 推荐(0) 编辑

摘要:1 //仅发送消息给自己(以及身上的其他MonoBehaviour对象) 2 gameObject.SendMessage("xxx"); 3 SendMessage("xxxx","xxxx"); 4 SendMessage("xxxxx",SendMessageOptions.DontRequi 阅读全文
posted @ 2023-05-09 19:26 ZERO_BEYOND 阅读(16) 评论(0) 推荐(0) 编辑

摘要:1 public class EventFunction : MonoBehaviour 2 { 3 public float attackValue=10000; 4 public float currentHP; 5 6 //对变量赋值的顺序(左边最先赋值,右边最后赋值,以此类推): 7 //变 阅读全文
posted @ 2023-05-07 22:19 ZERO_BEYOND 阅读(47) 评论(0) 推荐(0) 编辑

摘要:混合动画 1 private Vector2 lookDir = new Vector2(0, -1); 2 private Vector2 move = new Vector2(0, 0); 3 void Update() 4 { 5 //移动 6 float horizontal = Input 阅读全文
posted @ 2023-05-05 05:06 ZERO_BEYOND 阅读(131) 评论(0) 推荐(0) 编辑

摘要:2d射线检测 1 RaycastHit2D hit2D = Physics2D.Raycast(GetComponent<Rigidbody2D>().position + Vector2.up * 0.2f, lookDir, 1.5f, LayerMask.GetMask("xxx")); 2 阅读全文
posted @ 2023-05-05 05:03 ZERO_BEYOND 阅读(51) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示