Example #1
0
    public override void Start()
    {
        Debug.Log("Start =D");

        Debug.Log("Loading BitStage...");
        Object obj = FindObjectOfType(typeof(BitStage));

        if (obj == null)
        {
            Debug.LogError("Failed to load BitStage");
            return;
        }

        _stage = (BitStage)obj;

        StartMainWindowComponents(OpenWindow(MainMenuPrefab));
    }
Example #2
0
	void Awake(){
		root = GetComponent<BitStage>();
		
		gameControlWindow = root.FindControl<BitWindow>("EGameControlWindow");
		conversation = gameControlWindow.FindControl<BitBox>("ConversationBox");
		BitGroup headGroup = gameControlWindow.FindControl<BitGroup>("HeadGroup");
		
		helpButton = headGroup.FindControl<BitButton>("help");
		exitButton = headGroup.FindControl<BitButton>("exit");
		progressBar = headGroup.FindControl<BitGroup>("progress_bg").FindControl<BitHorizontalProgressBar>();
		tickCounter = gameControlWindow.FindControl<BitGroup>("TickCounter_bg").FindControl<BitVerticalProgressBar>();
		centerGroup = gameControlWindow.FindControl<BitGroup>("CenterGroup");
		skipDemoBtn = centerGroup.FindControl<BitButton>("SkipDemoBtn");
		playDemoBtn = centerGroup.FindControl<BitButton>("PlayDemoBtn");
		startButton = centerGroup.FindControl<BitButton>("start");
		
		gameHelpWindow = root.FindControl<BitWindow>("EGameHelpWindow");
		hPictureRender = gameHelpWindow.FindControl<BitPicture>();
		hPreBtn = gameHelpWindow.FindControl<BitButton>("help_btn_prev");
		hNextBtn = gameHelpWindow.FindControl<BitButton>("help_btn_next");
		hCloseBtn = gameHelpWindow.FindControl<BitButton>("close");
		hAlwaysShowHelp = gameHelpWindow.FindControl<BitToggle>();
		
		gameWindow = root.FindControl<BitWindow>("GameWindow");
	}