示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (player == null)
     {
         player        = GameObject.FindGameObjectWithTag("Player");
         player_script = player.GetComponent <Scr_PlayerControl>();
     }
     actual_bar.value   = player_script.health;
     actual_gauge.value = player_script.Ability_gauge();
     CT_count.text      = ms.getCT().ToString();
 }
示例#2
0
 // Update is called once per frame
 void Update()
 {
     if (bc.IsTouchingLayers(LayerMask.GetMask("Player")))
     {
         ms.setJellyHealth(player_script.health);
         ms.setJellyGauge(player_script.Ability_gauge());
         ms.set_definedSpawn(pre_defined_spawn_location);
         ms.setSpawnLocation(spawn_x, spawn_y);
         SceneManager.LoadScene(destination);
     }
 }
示例#3
0
    void GoToLevel()
    {
        int checkid = int.Parse(EventSystem.current.currentSelectedGameObject.name);

        checkid -= 1;
        Debug.Log(checkid);
        Vector2 [][] datalisty = spawndata.returndata();
        ms.setJellyHealth(player_script.health);
        ms.setJellyGauge(player_script.Ability_gauge());
        ms.set_definedSpawn(true);
        ms.setSpawnLocation(datalisty[sceneid][checkid].x, datalisty[sceneid][checkid].y);
        SceneManager.LoadScene(scenename);
    }
示例#4
0
 // Update is called once per frame
 void Update()
 {
     if (bc.IsTouchingLayers(LayerMask.GetMask("Player")))
     {
         UI_manager.ShowInterIndicator();
         //Debug.Log("Press S to enter");
         if (Input.GetKeyDown(KeyCode.S))
         {
             ms.setJellyHealth(player_script.health);
             ms.setJellyGauge(player_script.Ability_gauge());
             ms.set_definedSpawn(pre_defined_spawn_location);
             ms.setSpawnLocation(spawn_x, spawn_y);
             SceneManager.LoadScene(destination);
         }
     }
     else
     {
         UI_manager.HideInterIndicator();
     }
 }