12/12/09 15:01:01.36 rbjcfGmP
var ItemPop : boolean = false;
var menuSkin : GUISkin;
var sampleTexture : Texture2D;
function OnTriggerStay(otherObject: Collider){
if(otherObject.gameObject.tag == "ItemSensor"){
ItemPop = true;
}}
function OnGUI() {
if(ItemPop == true) {
GUI.skin = menuSkin;
GUI.Label(Rect(450, 320, 100, 40), "拾う");
if (Input.GetButtonDown("Fire1")) {
Time.timeScale = 0;
GUI.skin = menuSkin;
GUI.Label (Rect (120,50,512,512), sampleTexture);
GUI.skin = menuSkin;
GUI.Label (Rect (160,320,512,512),"アイテムの詳細内容文");
if (Input.GetButtonDown("Fire1")) {
Time.timeScale = 1;
Destroy(gameObject);
}}}}
function OnTriggerExit(otherObject: Collider){
if(otherObject.gameObject.tag == "ItemSensor"){
ItemPop = false;
} }