コード例 #1
0
        private void Awake()
        {
#if !UNITY_EDITOR
            Camera.main.orthographicSize *= 2.0f;
#endif

            SpaceUtil.Init();

            SpaceLarge.Init();
            SpaceSmall.Init();

            PlayButton.Init();
            Title.Init();

            Title.PositionY = SpaceUtil.WorldMap.Top.y - Title.BoxMap.Height;

            Vector2 buttonSize     = PlayButton.ButtonSize;
            Vector2 buttonSizeHalf = buttonSize * 0.5f;

            PlayButton.PositionY    = SpaceUtil.WorldMap.Center.y + buttonSizeHalf.y + ButtonOffsetHalf;
            OptionsButton.PositionY = SpaceUtil.WorldMap.Center.y - buttonSizeHalf.y - ButtonOffsetHalf;

            PlayVeryEasy.PositionY = SpaceUtil.WorldMap.Center.y + ((buttonSize.y + ButtonOffset) * 2);
            PlayEasy.PositionY     = SpaceUtil.WorldMap.Center.y + (buttonSize.y + ButtonOffset);
            PlayMedium.PositionY   = SpaceUtil.WorldMap.Center.y;
            PlayHard.PositionY     = SpaceUtil.WorldMap.Center.y - (buttonSize.y + ButtonOffset);
            PlayVeryHard.PositionY = SpaceUtil.WorldMap.Center.y - ((buttonSize.y + ButtonOffset) * 2);

            SetPlayAndOptionButtonsEnabled(true);
            SetDifficultyButtonsEnabled(false);
        }
コード例 #2
0
    public void Init(GameManager gameManager)
    {
        this.gameManager = gameManager;
        curMenu          = 0;

        //Initialize the sub-menus
        elementSelectMenu.Init(gameManager, this);
        gestureCalibrateMenu.Init(gameManager, this);

        //Initialize the buttons
        playButton.Init(0, this);
        calibrateButton.Init(1, this);
        settingsButton.Init(2);
        quitButton.Init(3);
    }