- 博客(11)
- 收藏
- 关注
原创 #Unity _ 计时器使用
#Unity _ 计时器使用GameTimerDatausing System.Collections;using System.Collections.Generic;using UnityEngine;public class GameTimerData{ private System.Action callback; private float time; public GameTimerData(float t,System.Action callback)
2021-04-23 14:23:11
177
原创 #Unity _ 对象池
using System.Collections;using System.Collections.Generic;using UnityEngine;public class PoolManager { public static PoolManager instance; private Dictionary<string, List<GameObject>> poolDic; public PoolManager() {
2021-04-21 21:11:38
134
原创 #Unity _ 快速排序
using System.Collections;using System.Collections.Generic;using UnityEngine;public class 快速排序 : MonoBehaviour{ void Start() { 快速排序Test(arr, 0, arr.Length - 1); } public int[] arr = new int[] { 1, 3, 2, 4, 5, 8, 7, 22, 32, 18, .
2021-04-09 22:16:42
544
原创 #Unity _ 希尔排序
using System.Collections;using System.Collections.Generic;using UnityEngine;public class 希尔排序 : MonoBehaviour{ int[] arr = { 8, 7, 10, 2, 1, 0, 21, 20 }; void Start() { for (int i = 0; i < arr.Length; i++) {
2021-04-06 15:03:23
173
原创 #Unity _ 插入排序
using System.Collections;using System.Collections.Generic;using UnityEngine;public class 插入排序 : MonoBehaviour{ public int[] arr = new int[] { 8, 7, 10, 2, 1, 0, 21, 20 }; private int lastIndex; //下标 private int curValue;//当前的值 privat
2021-04-03 14:48:43
237
原创 #Unity _ 冒泡排序
using System.Collections;using System.Collections.Generic;using UnityEngine;public class 冒泡排序 : MonoBehaviour{ int[] arr = new int[] { 2, 1, 6, 5, 8, 7, 9 }; public int[] 冒泡Test(int[] arr)//大到小排序 { for (int i = 0; i < arr.Length
2021-03-23 14:50:34
262
原创 #Unity _ 选择排序
using System.Collections;using System.Collections.Generic;using UnityEngine;public class 快速排序 : MonoBehaviour{ private int[] arr = new int[] { 22, 3, 43, 24, 6, 9, 10, 12, 5, 1, 8, 7 }; public void Start() { int[] temp = 快速排序Test(a
2021-03-22 21:02:17
188
原创 关于Unity 攻击敌人感官反馈
关于Unity 攻击敌人感官反馈镜头震动+攻击停顿//using System.Collections;using System.Collections.Generic;using UnityEngine;public class CameraShake : MonoBehaviour{ public bool isShake; //是否震动 public float shakeTime = 0.1f; //震动时长 public float shake
2021-03-09 14:47:07
569
原创 Characher Ctl
using System.Collections;using System.Collections.Generic;using UnityEngine;namespace WePead{public class Player : MonoBehaviour{[Header(“状态”)]public float speed = 6.0F;public float jumpSpeed = 8.0F;public float gravity = 20.0F; private Vecto
2021-01-07 17:56:59
141
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅