摘要:
using UnityEngine; using System.Collections; public enum BoxType { Normal,//普通格子 Equip//装备栏格子 } public enum EquipType { Weapon,//武器 Armor,//护甲 Shoot//鞋子 } public class Box... 阅读全文
posted @ 2016-10-29 21:23
扎北强子
阅读(778)
评论(0)
推荐(0)
摘要:
using UnityEngine; using System.Collections; using UnityEngine.SceneManagement; public class ApplicationDemo : MonoBehaviour { void Start() { //支持后台运行 Application.runInBackg... 阅读全文
posted @ 2016-10-29 20:58
扎北强子
阅读(275)
评论(0)
推荐(0)
摘要:
using UnityEngine; using System.Collections; using UnityEngine.EventSystems; //句柄 public class ButtonFuc : MonoBehaviour, IPointerEnterHandler,IPointerExitHandler,//进入,离开 IPointerDownHandler,IPointe... 阅读全文
posted @ 2016-10-29 20:54
扎北强子
阅读(420)
评论(0)
推荐(0)
摘要:
以上脚本意思是 在Button按钮上挂载该脚本从而判断在用户名密码输入的是否为真确的。 接下获取事件系统组件然后确认输入框焦点 阅读全文
posted @ 2016-10-29 20:49
扎北强子
阅读(777)
评论(0)
推荐(0)
摘要:
技能组件界面 ImageType是Filled类型 数值是1与脚本里面初始值一致,脚本控制其数字从1-0减小调整白色画布填充,达到有技能冷却效果。 阅读全文
posted @ 2016-10-29 20:11
扎北强子
阅读(587)
评论(0)
推荐(0)
摘要:
血条,蓝条对象上都挂上此脚本 阅读全文
posted @ 2016-10-29 20:03
扎北强子
阅读(445)
评论(0)
推荐(0)
摘要:
有了坦克之后再创造敌军坦克,随机生成并且向主坦克进攻。没有创造发射子弹以及敌人消失功能 阅读全文
posted @ 2016-10-29 17:01
扎北强子
阅读(423)
评论(0)
推荐(0)
摘要:
using UnityEngine; using System.Collections; public class PlayerTrigger : MonoBehaviour { void OnTriggerEnter(Collider other) { Debug.Log ("Enter"); } 阅读全文
posted @ 2016-10-29 16:35
扎北强子
阅读(327)
评论(0)
推荐(0)
摘要:
using UnityEngine; using System.Collections; public class RayCastDemo : MonoBehaviour { //射线碰撞检测器 RaycastHit hit; void Update() { //通过鼠标屏幕坐标,生成一条射线对象 Ray r = Camer... 阅读全文
posted @ 2016-10-29 16:31
扎北强子
阅读(222)
评论(0)
推荐(0)
摘要:
接物体的工具 创建掉落体的三个预设体 阅读全文
posted @ 2016-10-29 16:20
扎北强子
阅读(491)
评论(0)
推荐(0)
摘要:
要发射的子弹预设体 阅读全文
posted @ 2016-10-29 16:07
扎北强子
阅读(512)
评论(0)
推荐(0)
摘要:
using UnityEngine; using System.Collections; public class CubeAddForce : MonoBehaviour { float hor,ver; //力的方向向量 Vector3 forceDir; //力的大小 public float 阅读全文
posted @ 2016-10-29 15:52
扎北强子
阅读(5923)
评论(0)
推荐(0)
摘要:
按键获取 WASD获取 阅读全文
posted @ 2016-10-29 15:44
扎北强子
阅读(237)
评论(0)
推荐(0)
摘要:
using UnityEngine; using System.Collections; public class InitGameObject : MonoBehaviour { public GameObject bullet; void Update() { if (Input.GetKeyDown (KeyCode.Space)) { //通过预设体生成游戏对象(... 阅读全文
posted @ 2016-10-29 15:42
扎北强子
阅读(322)
评论(0)
推荐(0)
摘要:
using UnityEngine; using System.Collections; public class CyCollision : MonoBehaviour { void OnCollisionEnter(Collision other) { // Debug.Log ("Enter"); // Debug.Log(other.col... 阅读全文
posted @ 2016-10-29 15:38
扎北强子
阅读(259)
评论(0)
推荐(0)
摘要:
using UnityEngine; using System.Collections; public class CapsuleMove : MonoBehaviour { //方向 Vector3 dir; //上一帧的鼠标坐标 Vector3 begin; //当前帧的鼠标坐标 Vector3 end; public float speed = 3f; void O... 阅读全文
posted @ 2016-10-29 15:35
扎北强子
阅读(170)
评论(0)
推荐(0)

浙公网安备 33010602011771号