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

  • 相关阅读:
    屯【水】题计划
    【BZOJ2157】旅游
    【BZOJ2143】飞飞侠
    【BZOJ1036】[ZJOI2008]树的统计Count
    flask基础
    数据分析之Matplotlib
    pycharm 快捷键
    数据分析之pandas02
    数据分析之pandas01
    隐匿函数,二分法 冒泡排序
  • 原文地址:https://www.cnblogs.com/softimagewht/p/2257210.html
Copyright © 2011-2022 走看看