连击 天
fork: star:
using UnityEngine; using System.Collections; public class ShowHide : MonoBehaviour { public Texture2D img; void Update () { if (Time.time % 2 < 1) { guiTexture.texture = img; } ...
using UnityEngine; using System.Collections; public class Mouse : MonoBehaviour { Ray ray; RaycastHit hit; void Update() { if (Input.GetMouseButton(0)) { ray = Camera.main.Scree...
using UnityEngine; using UnityEditor; public class Example { [MenuItem("new Menu/new/new new/new item")] static void showDialog() { EditorUtility.DisplayDialog("title","messsage...
#pragma strict var Speed = 50; function Update() { if(Input.GetKey(KeyCode.W)) { transform.Translate(Vector3.forward * Time.deltaTime *Speed); } else if(Input.GetKey(KeyCode.S))...
using UnityEngine; using System.Collections; public class DistanceActive : MonoBehaviour { public GameObject station; private float distance; // Use this for initialization void...
using UnityEngine; using System.Collections; public class dengguang : MonoBehaviour { public float hSbarValue1; public float hSbarValue3; public Light light; void OnGUI() { hSba...
// Use this for initialization void Start () { } // Update is called once per frame void Update () { } void OnGUI(){ if(GUI.Button(new Rect (Screen.width - 150,Screen.height - 1...
#pragma strict var player : GameObject; function OnGUI() { // Print the x component of the position to the Console print( " X " +transform.position.x+ " Y "+transform.position.y...
算不是一篇完整的教程了,其实就是一段功能实现代码,平时大家可能也不怎么会用到,但如果是用unity3d来做一些投影项目的话,此段代码就是非常的有用了。此段代码主要的功能就是可以精确方便...
//TakeScreenshot.cs // TODO: // By default, screenshot files are placed next to the executable bundle -- we don't want this in a // shipping game, as it will fail if the user do...
var tempTime : float; var speed=0.1; function Start() { tempTime = 0;//初始aphal值 renderer.material.color.a=tempTime*speed; } function Update () { print(renderer.material.color...
没有更多内容
加载失败,请刷新页面
文章删除后无法恢复,确定删除此文章吗?
动弹删除后,数据将无法恢复
评论删除后,数据将无法恢复