zoukankan      html  css  js  c++  java
  • 【pico】_连续扣动两次扳机,退出应用

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using Pvr_UnitySDKAPI;

    public class gobackSceneManager : MonoBehaviour
    {
    private bool IsTiming;
    private float CountDown;


    void Update()
    {

    }

    private void ExitDection()
    {
    if (Controller.UPvr_GetControllerState(0) == ControllerState.Connected)
    {
      if (Controller.UPvr_GetKeyDown(0, Pvr_KeyCode.TRIGGER))
      {
        if (CountDown == 0)
        {
          CountDown = Time.time;
          IsTiming = true;
        }
        else
        {
          Application.Quit();
        }
      }
      if (IsTiming)
      {
        if (Time.time - CountDown > 2.0)
        {
          CountDown = 0;
          IsTiming = false;
        }
      }
    }
    }
    }

  • 相关阅读:
    云图小助理
    ping包的checksum校验和
    ftp相关
    初始化字符串
    安全的域名解析
    10进制转62进制
    centos6一键安装WordPress
    CEF3编译
    一次性生产KEY
    linux系统问题排查
  • 原文地址:https://www.cnblogs.com/RainZZY/p/15563777.html
Copyright © 2011-2022 走看看