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;
       }
      }
     }

  • 相关阅读:
    jichu
    scanf
    数位dp
    hdu 5667
    华东交通大学2018年ACM“双基”程序设计竞赛 K
    华东交通大学2018年ACM“双基”程序设计竞赛 D
    map
    次小生成树
    set
    c++11之为什么C++11引入了std::ref?
  • 原文地址:https://www.cnblogs.com/softimagewht/p/2257210.html
Copyright © 2011-2022 走看看