Wenkil的开发笔记
  • 首页
  • 归档
  • 分类
  • 标签
  • 关于
  •   
  •   

Unity展示鼠标滚动效果

鼠标操作物体旋转做3D展示,以及滚轮滑动远近距离观察功能以下脚本挂在物体上,把场景中相机给到变量中 using UnityEngine; using System.Collections; using System.Collections.Generic; public class test : MonoBehaviour { public Camera cam; pub

2018-04-10
游戏开发
Unity

DOTween插件学习

脚本1挂在场景物体上,使物体移动的方法 using System.Collections; using System.Collections.Generic; using UnityEngine; using DG.Tweening;//using DoTween的命名空间 public class test_one : MonoBehaviour { public Vector

2018-04-08
游戏开发
Unity

Unity AssetBundle加载资源包的四种方式

方式1 AssetBundle.LoadFromMemoryAsync 从内存异步加载先通过File转化成byte数组,再从字节数组里读取转化成Assetbundle IEnumerator aaa() { string ziyuan = "/Perfabs/xxx.assetbundle";//项目路径下的某个包 AssetBundleCr

2018-04-04
游戏开发
C# Unity AssetBundle

Unity AssetBundle初体验

加载资源脚本using System.Collections; using System.Collections.Generic; using UnityEngine; public class JIAZAI : MonoBehaviour { void Start() { //从本地加载包里的object AssetBundle

2018-03-22
游戏开发
C# Unity AssetBundle

Unity坐标系

关于Unity的一些坐标系的知识:Unity是左手坐标系世界坐标系:我们在场景中添加物体(如:Cube),他们都是以世界坐标显示在场景中的。transform.position可以获得该位置坐标。 屏幕坐标系:以像素来定义的,以屏幕的左下角为(0,0)点,右上角为(Screen.width,Screen.height),Z的位置是以相机的世界单位来衡量的。注:鼠标位置坐标属于屏幕坐标,Input.

2018-03-07
游戏开发
Unity

C#接口和类的区别

接口&类(1) 接口不能被实例化(2) 接口只能包含方法声明(3) 接口的成员包括方法、属性、索引器、事件(4) 接口中不能包含常量、字段(域)、构造函数、析构函数、静态成员(5) 接口中的所有成员默认为public,因此接口中不能有private修饰符(6) 派生类必须实现接口的所有成员(7) 一个类可以直接实现多个接口,接口之间用逗号隔开(8) 一个接口可以有多个父接口,实现该接口的类

2018-03-06
编程语言
C#

C#匿名方法的使用

代码using System; delegate void NumberChanger(int n); namespace DelegateAppl { class TestDelegate { static int num = 10; public static void AddNum(int p) {

2018-03-06
编程语言
C#

C#网络聊天室

简述使用VS控制台应用,开发C#网络通信代码。模拟聊天室。 代码首先创建一个ServerController的解决方案,使用一下脚本:服务器端脚本,ServerTestusing System; using System.Collections.Generic; using System.Net; using System.Net.Sockets; using System.Text; using

2018-02-24
编程语言
C#

C#结构体和类的区别

笔记11,结构是实值类型(Value Types),而类则是引用类型(Reference Types)。 2,结构使用栈存储(Stack Allocation),而类使用堆存储(Heap Allocation)。 3,所有结构成员默认都是Public,而类的变量和常量数则默认位Private,不过其他类成员默认都是Public。 4,结构成员不能被声明位Protected,而类成员可以。 5,结构

2017-11-08
编程语言
C#

Unity技能冷却功能

代码:// 技能的图标 public Image icon; //通过Text显示时间 public Text txt; float aTxt; bool Dtime = false; // 技能的冷却时间 public float coolDown; // 技能名称,用于区分使用了哪个技能的 //public string skillName; // 保存

2017-11-05
游戏开发
C# Unity
1…3456

搜索

Hexo Fluid My Github
沪ICP备2024081975号