var target1 : Transform; var target1C : Transform; var target2 : Transform; var target2C : Transform; var mousePos1 : Vector3; var mousePos2 : Vector3; var cursorImage : Texture; var Mouse : GUISkin; private var MouseImg : boolean = false; function
Unity3d开发的小游戏,#pragma strict //巡逻范围 var patrolRadius = 200; var currentTarget : Transform; //路径点 var wayPoints : Transform[]; var attackRadius = 5; var currentWayPoint : Transform; var findWayTime = 5; var lastTime = 0; //bot状态 var botState : Person
Improvements Optimized internal GetType() calls. (E.g., faster loading on mobile devices). Made Get/Set Property menus faster. Added OnDisable to CustomActionEditor. Called when the FSM is deselected. Made HutongGames.PlayMakerEditor.VariableEditor
var speed = 6.0; var jumpSpeed = 8.0; var gravity = 20.0; private var moveDirection = Vector3.zero; private var grounded : boolean = false; function FixedUpdate() { if (grounded) { // We are grounded, so recalculate movedirection directly from axes
之前一直有闻于NGUI中的HUD Text插件却一直未曾使用过,今天得以尝试,看了会儿官方的文档,楞是没给看明白,官方的ReadMe.txt写的使用方法如下: Usage: 1. Attach the HUDText scr ipt to a game object underneath your UIRoot and set the font it should use. 2. To make it follow an object drawn with another camera, at
Unity4.6 Samples UI using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; [RequireComponent(typeof(Image))] public class DragMe : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler { public bool dragOnSurfaces = true;