自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 收藏
  • 关注

转载 (转载)MonoBehaviour的事件和具体功能总结

分享一点MonoBehaviour的事件和具体功能总结的基础知识,苦于Visual Studio 2013没有对MonoBehaviour的行为做出智能提示,写个函数都要全手打,记性好的将就着手打,脑残一点的就复制粘贴,我就是后者。我曾经把MonoBehaviour的所有事件写成代码片段,后来快捷键全乱了,根本就记不住,后来就放弃了。做人还是老实点,我就整理了一份,能记住的就尽量记住吧。...

2015-12-01 14:25:00 169

转载 unity3d的延时调用函数

1.Invoke(string methodName,float time)在一定时间调用methodName函数using UnityEngine;using System.Collections; public class example : MonoBehaviour { public Rigidbody projectile; ...

2015-02-09 21:59:00 401

转载 unity3D 实现手机的双指触控和Input类touch详解

多点触控时,下标是从0开始的,两个触控点下标就是0,1。代码如下:nt touchCount = 2; // 触摸帧的数量if(touchCount == Input.touchCount()){vector2 touchPosition1 = Input.GetTouch(0).position;vector2 touchPosition2 = In...

2015-01-05 16:43:00 918

转载 Lua 关于"."与":"号的用法区别

"."的用法: TSprite = { x = 0, y = 0, } function TSprite.setPosition(m, x ,y) m.x = x; m.y = y end local who = TSprite  TSprite = nil...

2014-12-26 12:06:00 147

转载 C# 在多线程内控制winform控件

private delegate void FlushClient(); //委托 private void Form1_Load(object sender, EventArgs e) { Thread thread = new Thread(ThreadFunction); //创建一个线程  ...

2014-12-15 01:40:00 332

转载 unity3D之NGUI的小要点

Depth是全局的,并不是相对于父层,父与子深度一样时,子层更“深”转载于:https://www.cnblogs.com/Kprogram/p/4155967.html

2014-12-10 17:31:00 70

转载 Unity3D之Vector3.Dot(点积)和Vector3.Cross(叉积)的使用

在Unity3D中,Vector3.Dot表示求两个向量的点积;Vector3.Cross表示求两个向量的叉积。 点积计算的结果为数值,而叉积计算的结果为向量。两者要注意区别开来。 在几何数学中:1.点积 点积的计算方式为:a·b=|a|·|b|cos<a,b>其中|a|和|b|表示向量的模,<a,b>表示两个向量的夹角。另外...

2014-12-01 20:51:00 836

转载 LUA 关于table与多维的使用

table的使用:redat1 = {["mon"] = 1, ["tue"] = 2}print(redat1["mon"])redat2 = {1, 3}print(redat2[1])输出:1 1二维:d = {}d[1123] = {["q"] = 1,["w"] = 2,["e"] = 3}print(d[1123]["q...

2014-11-20 17:29:00 734

转载 unity 场景加载和对象消失的几种方法

场景加载:Application.LoadLevel(Application.loadedLevel); // 重新调用当前场景Application.LoadLevel(0); // 调用你在设置里摆放的场景,按你的摆放顺序调Application.LoadLevel("SceneName");  // 加载指定场景场景加载后保留当前指定的对象,留到下一个场景:...

2014-10-29 00:51:00 1069

转载 unity gameObject之间的调用函数的方法

例如:你想调用已经实例了的Player对象里的PlayJumpTo代码里的Jump()函数private PlayJumpTo playJumpto;private GameObject playerObj; void Start() {   playerObj = GameObject.FindWithTag ("Player");   play...

2014-10-23 23:43:00 529

转载 unity 相机平滑跟随游戏角色

把这个脚本赋给你的摄像机,再把游戏角色赋给character变量,之后就能实现摄像机平滑的跟随player在地球的任一角落了。using UnityEngine;using System.Collections;public class SmoothFollowerObj { private Vector3 targetPosition;...

2014-10-23 01:51:00 306

转载 unity 控制移动的方法

有两种方法.方法1: gameObject.transform.Translate(Vector3.forward * Time.deltaTime); //向前移动这是标准的运动方式,物体运动一段距离后停止。详细参考:http://www.apkbus.com/android-501-1.html方法2: this.rigidb...

2014-10-21 03:06:00 238

转载 unity 协同程序、中断和关卡加载

Unity关卡加载 (js代码)function Start () { yield WaitForSeconds(10.0);//程序中断10秒后,在执行 Application.LoadLevel("MainMenu");//执行加载MainMenu关卡 Destroy(this);//销毁当前关卡对象}// 在任何时间处理程序都...

2014-10-14 17:22:00 98

转载 unity 的动态创建对象和对象碰撞消息

1.多个GameObject 的随机抽取public GameObject[] hazards;void Fun(){  // 从多个gamObj中抽取一个 GameObject o = hazards [Random.Range (0, hazards.Length)]; Vector3 p = new Vector3 (x, y, z); Quater...

2014-10-11 22:36:00 157

转载 unity 获取和设置gameObject的坐标

// 获取Player变量指定的对象的三围坐标Vector3 player_postion = Player.transform.position;// 获取X,Y,Z值float x = player_postion.x;float y = player_postion.y;float z = player_postion.z;// 设置应用了...

2014-10-10 21:06:00 18961

转载 重新启程!

  看看日志,一晃已是一年半,一年半没有再动笔记录我的编程点滴,一年半没有真真正正写程序了,而我也已经从学生变成了工作者。现在我决定重新踏上我的编程之路!不管这样的未来是否富裕,我必须选择这条道路,这是我唯一的道路,他适合我,也只有他适合我,这是我放肆的一年半里得出的答案。转载于:https://www.cnblogs.com/Kprogram/p/4017697.html...

2014-10-10 20:10:00 116

转载 ASP:去掉HyperLink控件的下划线

在<style></style>内加上#hypLogin { text-decoration: none;}hypLogin 是你控件的ID来自:http://iask.sina.com.cn/b/17897792.html转载于:https://www.cnblogs.com/Kprogram/p/3155130.html...

2013-06-25 17:43:00 388

转载 C#:鼠标移动None Form界面

加入命名空间:using System.Runtime.InteropServices;using System.Security.Cryptography;[DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32....

2013-05-18 00:36:00 110

转载 C#:透明按钮

设置btn FlatStyle为: Flat设置btn背景为:Transparent更彻底的话就要使用如下方法————/// <summary>/// 设置透明按钮样式/// </summary>private void SetBtnStyle(Button btn)  ...

2013-05-18 00:32:00 87

转载 C#:如何设置桌面背景

[DllImport("user32.dll", EntryPoint = "SystemParametersInfo")] public static extern int SystemParametersInfo( int uAction, int uParam, string lpvP...

2013-04-01 16:58:00 622

转载 C#:如何播放音乐

添加控件:Windows Media Player axWindowsMediaPlayer1.URL = @"D:\KuGou\张国荣 - 我 - 压轴 2000热情演唱会.mp3"; axWindowsMediaPlayer1.Ctlcontrols.play();信息来源:http://www.csharpwin.co...

2013-03-28 01:40:00 83

转载 C#:判断字符串内是否所有都是数字

string DateStr(DateTime timeToString) { string timeString = timeToString.ToString(); string cToString = ""; // char.IsNumber()是个系统函数,检...

2013-03-02 15:48:00 679

转载 SQL:IF存在就增加,不存在就插入 + 创建带参数的存储过程

create PROCEDURE [dbo].[Pr_inportEasy_updateORinsert] @P1 varchar(20), @P2 varchar(20), @p3 intAS --创建if EXISTS(select * from inportEasy WHERE inportbName = @P1 and typ...

2013-02-10 18:26:00 342

转载 SQL:创建触发器

create trigger T_ComputerNewUpdateChassis on [dbo].[computerNew]for insertas update dbo.inport set quantity = quantity - 1where inportName = (select Chassis from inserted)这是一个插...

2013-02-10 16:32:00 54

转载 C#:按ESC就退出

设置窗体属性KeyPreview=True。private void Form1_KeyUp(object sender, KeyEventArgs e){ if (e.KeyData == Keys.Escape)Application.Exit();}来自:http://zhidao.baidu.com/question/17393332.html转...

2013-01-12 19:33:00 607

转载 C#:去除小数点后无效的零

.ToString().TrimEnd('.','0')来自:http://zhidao.baidu.com/question/241077663.html转载于:https://www.cnblogs.com/Kprogram/archive/2013/01/09/2853605.html

2013-01-09 20:14:00 1582

转载 C#:如何将SQL的数据显示在comboBox

SqlConnection Conn=....//初始化,comboBox1绑定客户表string Sql= "select customerName from customer";DataSet Ds= new DataSet();SqlDataAdapter Da= new SqlDataAdapter(Sql, Conn);Da.Fill(Ds, "cust...

2013-01-07 15:40:00 424

转载 C#:使显示在Form1的容器中的Form大小跟随Form1大小变动(不能瞬即缩小)

private void frmMain_SizeChanged(object sender, EventArgs e) { FrmSell.Size = pnlShowFrm.Size; }设置form1的SizeChanged动作。  有缺憾:缩小不能同步,不知道如何更好做...

2013-01-06 03:38:00 260

转载 C# :在panel1控件中显示Form

this.panel1.Controls.Clear();//在加载控件时 先清空容器。 Form2 Frm = new Form2(); Frm.TopLevel = false; //这个很重要 。 this.panel1.Controls.Add(Frm); ...

2012-12-30 23:57:00 339

转载 C#: 判断两个图片是否为同一张图片

我这里是要比较button的图片是哪一个?(有两个流),然后问了人是要使用流来比较,以下是他给我的参考,来自:http://blog.csdn.net/eryongyan/article/details/6608355使用命名空间:using System.IO;private bool Same(Image image1, Image image2) ...

2012-12-30 21:57:00 175

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除