• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
白染
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 2 3 4 5 6 下一页
2018年12月4日
用 MoveTowards实现多点移动
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class MoveCube : MonoBehaviour { public Vector3[] pos; int num=0; // Use this for initialization ... 阅读全文
posted @ 2018-12-04 11:05 白染 阅读(2582) 评论(0) 推荐(1)
坦克大战中摄像机的设置
摘要: 效果图: 设置如下: 阅读全文
posted @ 2018-12-04 11:04 白染 阅读(323) 评论(0) 推荐(0)
对象池
摘要: 我对 对象池的理解为: 在大型游戏中,往往有些物体需要不断的销毁,不断的生成,这样就很消耗资源。所以对象池技术就应运而生了。 比喻成一个池子,当不在需要时,本该销毁的物体,放回对象池中,使其失活,当再次需要使用时,再次从对象池中取出,让其激活。 当对象池中的物体全部取出,外界还需要时,在外界重新生成 阅读全文
posted @ 2018-12-04 10:55 白染 阅读(270) 评论(0) 推荐(0)
单例模式
摘要: 单例:通过此类,永远只能创建一个对象过程:1.创建一个类类型的静态变量2.编写private构造函数,给字段进行初始化3.编写静态方法,通过private构造函数创建类变量 (1)判断类变量是否为空 (2)如果为空,调用private构造函数创建类变量,不为空,直接return (3)函数返回类变量 阅读全文
posted @ 2018-12-04 10:38 白染 阅读(145) 评论(0) 推荐(0)
C#:进程
摘要: using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _003进程 { class Program { stati... 阅读全文
posted @ 2018-12-04 10:35 白染 阅读(211) 评论(0) 推荐(0)
C#:特性
摘要: #define IsText//添加一个宏,接触注释 using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threadin... 阅读全文
posted @ 2018-12-04 10:33 白染 阅读(164) 评论(0) 推荐(0)
C#:反射
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace _001反射 { class Program { static... 阅读全文
posted @ 2018-12-04 10:32 白染 阅读(136) 评论(0) 推荐(0)
静态和非静态类
摘要: 静态和非静态:区别:静态类与非静态类的重要区别在于静态类不能实例化,也就是说不能使用new关键字创建静态类类型的变量。在声明一个类时使用static关键字,具有两个方面的意义:首先,它防止程序员写代码来实例化该静态类;其次:它防止在类的内部声明任何实例字段或方法。 特点:1.静态类中只能包含静态成员 阅读全文
posted @ 2018-12-04 10:31 白染 阅读(185) 评论(0) 推荐(0)
数据的存入取出(注册机方式)
摘要: 数据的存入和读取: using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerfesText : MonoBehaviour { string usrname = "李四"; int password = 88888; // Use ... 阅读全文
posted @ 2018-12-04 10:29 白染 阅读(213) 评论(0) 推荐(0)
退出unity运行
摘要: public void GetExit()//退出运行 { #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false;//用于退出运行 #else Application.Quit(); #endif } GameObject go = new GameObject("Empty")... 阅读全文
posted @ 2018-12-04 10:24 白染 阅读(1617) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3