コード例 #1
0
    // Use this for initialization
    void Start()
    {
        Instance = this;
        weight   = new AttractorWeight(3.5f, 0, 0, 0, 0, 0, 0, 100, 0);

        systemState |= SystemState.LOAD;

        #region システム
        if ((systemState & SystemState.LOAD) == SystemState.LOAD)
        {
            //カメラ状態設定
            cameraState       |= CameraState.ORTHOGRAPHIC | CameraState.ZOOM_OUT;
            zoomEnabled        = false;
            interactiveEnabled = false;

            //初期設定読み込み
            LoadSettingFlies lsf = GetComponent <LoadSettingFlies>();
            lsf.Load();

            //Wall設定
            AutoDisplayAdjuster wall = GetComponent <AutoDisplayAdjuster>();
            wall.Load();

            //GUI処理
            GUIManager gui = GetComponent <GUIManager>();
            gui.Initialize();
        }
        #endregion

        #region ポインティング
        pointingState |= PointingState.POINTING;
        #endregion

        #region アトラクター
        attractorState = attractorState | AttractorState.AVOID | AttractorState.AVOID_SCALE | AttractorState.SCALE_UP | AttractorState.FRAME;
        if ((pointingState & PointingState.POINTING) == PointingState.POINTING)
        {
            attractorState |= AttractorState.SCALE_UP_MOUSE;
        }
        else if ((pointingState & PointingState.VENN) == PointingState.VENN)
        {
            //attractorState |= AttractorState.FRAME;
        }
        zAxisDirection = true;
        #endregion

        systemState  = ~SystemState.LOAD & systemState;
        systemState |= SystemState.MAIN;
    }
コード例 #2
0
    public void Load()
    {
        Instance            = this;
        _cameraSize         = targetCamera.orthographicSize;
        OnScreenSizeChanged = new OnScreenSizeChange(AdjustWall);

        BottomWallLength = 2;
        TopWallLength    = 2;

        AdjustWallOffset();
        UpdateLate();
        lastScreenSize = new Vector2(Screen.width, Screen.height);
        screenChange   = false;
        wallChange     = false;
        AdjustWall(lastScreenSize);
    }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     BackgroundSprite = Sprite.Create(Texture2D.whiteTexture, new UnityEngine.Rect(0, 0, 1, 1), new Vector2(0.5f, 0.5f), 100);
     spriteRenderer   = gameObject.GetComponent <SpriteRenderer>();
     auto             = camera.GetComponent <AutoDisplayAdjuster>();
 }