コード例 #1
0
 void Start()
 {
     //cache the death menu and event system
     death_menu   = gameObject.GetComponent <Deathmenu>();
     event_system = gameObject.GetComponent <EventSystemScript>();
     pause_menu   = GameObject.Find("Pausemenu").GetComponent <Canvas>();
     set_active(false);
 }
コード例 #2
0
 void Start()
 {
     //cache the player, spawnpoint and other important objects
     player       = GameObject.Find("CubePlayer");
     spawn_point  = GameObject.Find("Spawnpoint");
     pause_menu   = GameObject.Find("SceneManager").GetComponent <Pausemenu>();
     event_system = gameObject.GetComponent <EventSystemScript>();
     death_menu   = GameObject.Find("Deathmenu").GetComponent <Canvas>();
     powerups     = GameObject.FindGameObjectsWithTag("Powerup");
     set_active(false);
 }
コード例 #3
0
 void Awake()
 {
     if (eventSystemScript == null)
     {
         // DontDestroyOnLoad(gameObject);
         eventSystemScript = this;
     }
     else if (eventSystemScript != this)
     {
         Destroy(gameObject);
     }
 }