- 博客(8)
- 收藏
- 关注
原创 cocos骨骼动画API之armature.animation.fadeIn
【代码】cocos骨骼动画API之armature.animation.fadeIn。
2023-07-03 21:18:01
219
原创 委托系统框架
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; //在这里添加委托名 enum EventEnum { changedHP, changedMP, levelUp, } class MyEventSystem { private static Dictionary<EventEnum
2021-11-08 15:01:12
146
原创 unity实现简单路径导航
实现一个点击地面,人物移动并显示导航路径的效果。 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; using UnityEngine.EventSystems; using UnityEngine.UI; public class Player : MonoBehaviour { NavMeshAgent agent; public Li
2021-11-08 14:44:39
913
原创 使用对象池
首先,我们要创建一个对象池类 using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPool { Dictionary<string, List<GameObject>> pool; private static ObjectPool _instance = null; private ObjectPool(
2021-11-08 12:04:09
146
原创 c#实现简单排序
namespace Sort { public class Sort { public static void Main() { int[] arr = new int[] { 5, 1, 13, 6, 10, 55, 99, 2, 87, 12, 34, 75, 33, 47 }; BubbleSorter.Sort(arr); //SelectionSorter.Sort(arr);
2021-11-08 10:34:22
470
原创 Unity射线
射线 //创建射线,提前给定射线的发射位置和方向 Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); //Ray ray = camera.ScreenPointToRay(Input.mousePosition); //Ray ray = new Ray(startPosition,endPosition); //碰撞信息,用于接收碰撞到的物体是谁以及碰撞点的位置和信息 RaycastHit hit; if (Physics.Rayc
2021-11-06 09:38:46
287
原创 协程知识点
协程知识点 什么是协同程序? 协程并不是多线程的,只是在同一个线程中开辟了一段代码块 主要要注意的地方,协程的开启,和yield return的使用 在主线程运行的同时开启另一段逻辑处理,来协助当前程序的执行,协程很像多线程,但是不是多线程,Unity的协程实在每帧结束之后去检测yield的条件是否满足。 1、要弄清楚携程首先得弄清楚生命周期函数,在unity中的生命周期函数 Awake():唤醒事件,游戏一开始运行就执行,只执行一次 OnEnable():启用事件,只执行一次。当脚本组件被启用时执行一
2021-11-03 15:31:47
285
空空如也
关于#unity打包安卓后无法保存xlsx
2023-02-07
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅