Gizmo
来源:互联网 发布:js定时刷新页面 编辑:程序博客网 时间:2024/06/02 04:59
using UnityEngine;
using System.Collections;
public class Gizmo : MonoBehaviour{
void OnDrawGizmos () {
Gizmos.DrawWireSphere(transform.position,1);
}
}
//-------------------------------------------------------------------
using UnityEngine;
using System.Collections;
public class CameraController : MonoBehaviour{
public Transform target;
void Update () {
iTween.LookUpdate(gameObject,target.position,2);
}
}
//-------------------------------------------------------------------
using UnityEngine;
using System.Collections;
public class PathExample : MonoBehaviour{
public Transform[] path;
public GUIStyle style;
private bool buttonActivated;
void Start(){
tween();
}
void OnGUI () {
if(buttonActivated){
if(GUI.Button (new Rect (67,178,113,32), "",style)){
reset();
tween();
}
}
}
void OnDrawGizmos(){
iTween.DrawPath(path);
}
void tween(){
iTween.MoveTo(gameObject,iTween.Hash("path",path,"time",7,"orienttopath",true,"looktime",.6,"easetype","easeInOutSine","oncomplete","complete"));
}
void reset(){
buttonActivated=false;
transform.position=new Vector3(0,0,0);
transform.eulerAngles=new Vector3(0,0,0);
}
void complete(){
buttonActivated=true;
}
}
- Gizmo
- Ogitor中Gizmo的绘制技巧
- Landscape - 使用Landscape Gizmo复制地形
- 【转】Ogitor中Gizmo的绘制技巧 - 战魂小筑 - C++博客
- Unity中的Transform Gizmo中的Pivot和Center
- 3d编辑器的gizmo的缩放计算
- Unity中的Transform Gizmo中的Pivot和Center
- CListCtrl排序
- 解决启动Eclipse后提示'Running android lint'错误的问题
- mapreduce任务失败、重试、推测式执行机制小结
- 构造函数,友元,static类成员,复制控制
- 面向程序员的设计模式 ——GoF《设计模式》读书总结(壹)抽象工厂&生成器
- Gizmo
- 实现extjs actioncolumn中点击图标 显示手型的偏方
- kmp算法代码
- vc++实现无进程无DLL无硬盘文件无启动项的ICMP后门后门程序
- 关键词过滤(脏字过滤)Trie Tree(Hash)和FastCheck两种过滤方式java版本
- linux内核导出符号
- 红黑树 删除
- storyboard相关知识点-零散记录
- 关于main函数:指针数组作为main函数的参数