zoukankan      html  css  js  c++  java
  • 屏幕旋转

    void Update () {
      //处理横向两个方向旋转
      if(Input.deviceOrientation == DeviceOrientation.LandscapeLeft)
      {
       if (Screen.orientation != ScreenOrientation.LandscapeLeft) {
        Screen.orientation = ScreenOrientation.LandscapeLeft;
       }
      }else if(Input.deviceOrientation == DeviceOrientation.LandscapeRight)
      {
       if (Screen.orientation != ScreenOrientation.LandscapeRight) {
        Screen.orientation = ScreenOrientation.LandscapeRight;
       }
       
      }else
      //处理纵向两个方向的旋转
      if(Input.deviceOrientation == DeviceOrientation.Portrait)
      {
       if (Screen.orientation != ScreenOrientation.Portrait) {
        Screen.orientation = ScreenOrientation.Portrait;
       }
      }else if(Input.deviceOrientation == DeviceOrientation.PortraitUpsideDown)
      {
       if (Screen.orientation != ScreenOrientation.PortraitUpsideDown) {
        Screen.orientation = ScreenOrientation.PortraitUpsideDown;
       }
      }
     }

  • 相关阅读:
    tomcat配置服务器默认访问index页面
    AJAX跨域名
    MYSQL日期格式
    java群发邮箱
    判断execl格式
    java解析excel表格数据
    json解析数据
    generatorConfig自动生成
    简单后台调用api
    Spring邮箱发送
  • 原文地址:https://www.cnblogs.com/softimagewht/p/2257210.html
Copyright © 2011-2022 走看看