- 博客(19)
- 资源 (1)
- 收藏
- 关注
原创 DOTWeen 的各种方法使用
using UnityEngine; 2 using System.Collections; 3 using DG.Tweening; 4 using UnityEngine.UI; 5 6 7 public class TestDoTween : MonoBehaviour { 8 9 int number = 0; 10 // Use t
2018-01-27 15:03:14
14141
原创 利用System.Action做回调
using System;using System.Collections.Generic;using System.Collections;using UnityEngine.EventSystems;using UnityEngine.UI;using UnityEngine;public class TooltipUI : BaseUI{pub
2017-12-19 14:48:08
3263
原创 制作unity小工具 获取FBX模型里面的AnimationClip片段
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEditor;using System.IO;using System;public class AnimatorTools : EditorWindow {[MenuItem(
2017-12-14 17:56:49
3778
原创 斗地主手牌 代码
using UnityEngine;using System.Collections;using System.Collections.Generic;/// /// 出牌规则/// public class CardRules{ /// /// 卡牌数组排序 /// /// /// publi
2017-11-30 17:33:27
1133
翻译 让你轻松学会unity的状态机?
Unity FSM 有限状态机翻译了一下unity wiki上对于有限状态机的案例,等有空时在详细写一下。在场景中添加两个游戏物体,一个为玩家并修改其Tag为Player,另一个为NPC为其添加NPCControl脚本,并为其将玩家角色和路径添加上去。(该案例利用状态机简单的实现了一个NPC的简单AI---巡逻---看到玩家----追逐玩家----丢失玩家----巡逻) 1
2017-11-23 19:56:34
1505
原创 服务器与客户端异步---》的写法
---------------------------------我们开始先写我们Tcp客户端的代码using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Net.Sockets;
2017-11-10 22:22:38
714
原创 shader波纹效果
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'//贴图自己找就行了 随便放进一张即可Shader "Custom/Wave" { Properties{ _MainTex("MainTex",2D)="white"{}_tinAmount
2017-11-09 19:12:27
574
原创 shader知识点整理
利用shader来做图片颜色变化和旋转大小变化using System.Collections;using System.Collections.Generic;using UnityEngine;public class Transform2 : MonoBehaviour {// Use this for initializationvoid Start
2017-11-07 20:18:33
349
原创 shader基础教程
Shader "Custom/Test11-07" {SubShader {pass{ CGPROGRAM#pragma vertex vert //顶点函数#pragma fragment frag //片段函数struct v2f//结构体{ fixed4 col:COLOR;float4 pos:POSITION;};void
2017-11-07 19:07:28
884
原创 利用shader做玻璃效果
先看看玻璃效果 然后再将代码复制到你的shader文件中进行实现 有个贴图可以随便找一张贴图即可 Shader "Custom/ThirdTest" { Properties { _Color("主颜色",Color)=(1,1,1,0) _SpecColor("高光颜色",Color)=(1,1,1,1)
2017-11-06 22:17:19
1904
原创 利用io流进行文件读取和写入
public void SaveFile(string path,string name,string information) { StreamWriter sw; FileInfo t = new FileInfo(path+"//"+name); if (!t.Exists) {
2017-11-01 18:56:51
1890
原创 利用mvc 和数据结合来做mail 邮件系统
先看看效果做出来的效果 ,当然很多效果都是必须建立在你了解的基础上才能够更好的完成 不多说 直接看效果M:代码:using System;using System.Collections;using System.Collections.Generic;using UnityEngine;public class MailModle {privat
2017-10-30 21:07:50
1379
原创 利用MVC来做背包系统
MVC至少要建立四个文件脚步M脚本:using System.Collections;using System.Collections.Generic;using UnityEngine;using LitJson;public class BagModle { //MVC格式 modle纯数据格式 不需要继承monoBehaviour // Use
2017-10-22 20:40:27
2827
1
原创 unity socket 服务器sever 代码
using System.Collections;using System.Collections.Generic;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;using UnityEngine;public class Sever : Mo
2017-10-19 11:56:50
2388
原创 unity学习如何做服务器与客户端
首先要先建立两个VS(Micsoft Visual Studio)项目 一个放 sever脚步 一个放client脚本 sever 脚本 1.using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;u
2017-10-17 16:44:04
8612
1
原创 NGUI写卡牌拖放效果
NGUI写 卡牌拖放的 检查 非常简单 射线都是NGUI封装好的 大家可以来看看代码就知道了 public class Dragable : UIDragDropItem{ protected override void OnDragDropRelease(GameObject surface) { base.OnDragDropRelease
2017-10-14 16:22:27
458
原创 unity 2d利用shader 做闪光特效
很多时候做unity 2d 特效 今天发给大家源代码// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'Shader "Custom/Flash"{ Properties { _MainTex ("Base (RGB), Alph
2017-10-12 22:08:45
7347
原创 unity中利用 sqlite来做单例的数据库链接
using Mono.Data.Sqlite;using UnityEngine;using System.Collections;using System.Collections.Generic;public class TaskDataBase { //任务系统数据库的单例 static TaskDataBase _instance; public
2017-10-12 17:53:05
497
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人