摘要: 把这个脚本赋给你的摄像机,再把游戏角色赋给character变量,之后就能实现摄像机平滑的跟随player在地球的任一角落了。using UnityEngine;using System.Collections;public class SmoothFollowerObj { priv... 阅读全文
posted @ 2014-10-23 01:51 混蛋程序员 阅读(9694) 评论(0) 推荐(0) 编辑
摘要: 有两种方法.方法1: gameObject.transform.Translate(Vector3.forward * Time.deltaTime); //向前移动这是标准的运动方式,物体运动一段距离后停止。详细参考:http://www.apkbus.com/android-501-1.ht... 阅读全文
posted @ 2014-10-21 03:06 混蛋程序员 阅读(1445) 评论(0) 推荐(0) 编辑
摘要: Unity关卡加载 (js代码)function Start () { yield WaitForSeconds(10.0);//程序中断10秒后,在执行 Application.LoadLevel("MainMenu");//执行加载MainMenu关卡 Destroy(this... 阅读全文
posted @ 2014-10-14 17:22 混蛋程序员 阅读(757) 评论(0) 推荐(0) 编辑
摘要: 1.多个GameObject 的随机抽取public GameObject[] hazards;void Fun(){ // 从多个gamObj中抽取一个 GameObject o = hazards [Random.Range (0, hazards.Length)]; Vector3 p =... 阅读全文
posted @ 2014-10-11 22:36 混蛋程序员 阅读(3119) 评论(0) 推荐(0) 编辑
摘要: // 获取Player变量指定的对象的三围坐标Vector3 player_postion = Player.transform.position;// 获取X,Y,Z值float x = player_postion.x;float y = player_postion.y;float z = p... 阅读全文
posted @ 2014-10-10 21:06 混蛋程序员 阅读(40206) 评论(0) 推荐(0) 编辑
摘要: 看看日志,一晃已是一年半,一年半没有再动笔记录我的编程点滴,一年半没有真真正正写程序了,而我也已经从学生变成了工作者。现在我决定重新踏上我的编程之路!不管这样的未来是否富裕,我必须选择这条道路,这是我唯一的道路,他适合我,也只有他适合我,这是我放肆的一年半里得出的答案。 阅读全文
posted @ 2014-10-10 20:10 混蛋程序员 阅读(296) 评论(1) 推荐(1) 编辑
摘要: 在内加上#hypLogin { text-decoration: none;}hypLogin 是你控件的ID来自:http://iask.sina.com.cn/b/17897792.html 阅读全文
posted @ 2013-06-25 17:43 混蛋程序员 阅读(696) 评论(0) 推荐(0) 编辑
摘要: 加入命名空间:using System.Runtime.InteropServices;using System.Security.Cryptography;[DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); public cons... 阅读全文
posted @ 2013-05-18 00:36 混蛋程序员 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 设置btn FlatStyle为: Flat设置btn背景为:Transparent更彻底的话就要使用如下方法————/// <summary>/// 设置透明按钮样式/// </summary>private void SetBtnStyle(Button btn) //在Form1_Load时候调用{ btn.FlatStyle = FlatStyle.Flat;//样式 btn.ForeColor = Color.Transparent;//前景 btn.BackColor = Color.Transparent;//去背景 btn.FlatAppearance. 阅读全文
posted @ 2013-05-18 00:32 混蛋程序员 阅读(4141) 评论(0) 推荐(0) 编辑
摘要: [DllImport("user32.dll", EntryPoint = "SystemParametersInfo")] public static extern int SystemParametersInfo( int uAction, int uParam, string lpvParam, int fuWinIni ); private void button1_Click(object sender, EventArgs e) { ... 阅读全文
posted @ 2013-04-01 16:58 混蛋程序员 阅读(5884) 评论(0) 推荐(0) 编辑