示例#1
0
 public void selected()
 {
     if (index == whereSpawn.story_n)
     {
         if (Input.GetKeyDown(KeyCode.Z))
         {
             whereSpawn.where = 1;
             selected_bool    = true;
             scene_anim.SetTrigger("close");
             k           = 8;
             select_bool = false;
             loading.loadingachangescene(4);
         }
     }
     if (index == whereSpawn.story_n + 1)
     {
         if (Input.GetKeyDown(KeyCode.Z))
         {
             scene_anim.SetTrigger("close");
             // index = 0;
             k           = 8;
             select_bool = false;
         }
     }
     if (Input.GetKeyDown(KeyCode.X))
     {
         scene_anim.SetTrigger("close");
         index       = 0;
         select_bool = false;
     }
 }
示例#2
0
    private void OnTriggerStay2D(Collider2D other)
    {
        if (other.gameObject.name == "player")
        {
            if (player.isGrounded == true)
            {
                if (Input.GetKeyDown(KeyCode.UpArrow))
                {
                    whereSpawn.where = tranform;
                    //SceneManager.LoadScene(scene);
                    loading.loadingachangescene(scene);
                    //player.canmove = false;
                }
            }
        }

    }