- 博客(15)
- 收藏
- 关注
转载 C#利用TCP传送各种文件的脚本 listener&&client
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;using System.T...
2017-11-20 13:39:00 192
转载 鼠标在屏幕上的移动来控制相机水平,垂直旋转
using UnityEngine;using System.Collections;public class CameraController : MonoBehaviour { public float distance_v; public float distance_h; public float rotation_H_speed=1;...
2017-11-18 10:12:00 225
转载 第三人称控制(通过右键和滑轮实现角度切换)
//在玩家身上挂载using UnityEngine;using System.Collections;public class move_controll : MonoBehaviour {Transform m_transform,m_camera;//人物自己以及相机的对象CharacterController controller;//Charactor Co...
2017-11-17 20:41:00 166
转载 U3D通过距离控制攻击的脚本
//对于单个敌人的伤害脚本 Animator _animator; Transform _enemy; // Use this for initialization void Start () { _animator = GetComponent<Animator>(); //获得动画组件 _enemy = GameObject.F...
2017-11-15 14:15:00 196
转载 U3D准星
using UnityEngine;using System.Collections;public class DrawStar : MonoBehaviour { public Material _mat; public Color _starColor; const float minDistance = 1.5f; const float max...
2017-11-14 17:54:00 679
转载 增加了控制跑步时间的移动脚本
using UnityEngine;using System.Collections;public class MySoliderMove : MonoBehaviour{ Transform _head; Transform _gun; public float workTime; float _runTime=10; bool isEmp...
2017-11-14 17:48:00 171
转载 U3DFPS第一人称 控制视野的移动脚本
using UnityEngine;using System.Collections;public class MySoliderMove : MonoBehaviour{ Transform _head; Transform _gun; // Use this for initialization void Start() { _...
2017-11-14 16:02:00 383
转载 u3d Animator和脚本控制FPS骑士
using UnityEngine;using System.Collections;public class PlayerMove : MonoBehaviour { Transform _head; Animator _animator; void Start () { _head = transform.FindChild("Head"); ...
2017-11-11 21:28:00 189
转载 C#正则表达式大全
一、校验数字的表达式数字:^[0-9]*$n位的数字:^d{n}$至少n位的数字:^d{n,}$m-n位的数字:^d{m,n}$零和非零开头的数字:^(0|[1-9][0-9]*)$非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9]{1,2})?$带1-2位小数的正数或负数:^(-)?d+(.d{1,2})?$正数、负数、和小数:^(-|+)?d+(.d+)?$...
2017-11-09 09:02:00 274
转载 U3D 脚本控制Animator
using UnityEngine;using System.Collections;public class Ctrl : MonoBehaviour { Animator an; // Use this for initialization void Start () { an = GetComponent<Animator>(); } ...
2017-11-07 13:58:00 182
转载 第一人称控制器
using UnityEngine;using System.Collections;using System;public class Move : MonoBehaviour { Transform head; public float speed = 10f; Rigidbody self; public float rotateSpeed = 10f...
2017-11-07 09:05:00 157
转载 碰撞检测和触发
都有钢体OnCollisionEnter 进入碰撞方法体OnCollisionExit 结束碰撞方法体OnCollisionStay 碰撞进行时方法体OnTriggerEnter 碰撞体进入 (触发开始)OntriggerExit 碰撞体退出 (触发结束)OntriggerStay 碰撞体进行时的方法 (触发时)碰撞产生的条件:1、两方都有碰...
2017-11-06 11:13:00 310
转载 C#委托持有方法的初阶
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;namespace ConsoleApplication13{ class Program { ...
2017-10-31 20:48:00 101
转载 u3d使摄像机跟随物体
using UnityEngine;using System.Collections;public class Movefollo : MonoBehaviour { Transform _player; Vector3 f; // Use this for initialization void Start () { _player= G...
2017-10-31 20:30:00 172
转载 u3d使用horizontal移动物体
using UnityEngine;using System.Collections;public class Move : MonoBehaviour { Transform _player; // Use this for initialization void Start () { _player = GameObject.Find("S...
2017-10-31 20:28:00 1522
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人