コード例 #1
0
ファイル: MainGameWorld.cs プロジェクト: chenaho/Unity3d_3M
    // Use this for initialization
    protected void Start()
    {
        CoreBoard = (BoardBehavior) GetComponent("BoardBehavior");

        progressBar_Base = UIProgressBar.create(buttonToolkit, "UI_Base.png", 0, 0,true,2  );
        //progressBar_Science.positionFromBottomLeft( .15f, .02f );
        progressBar_Base.positionFromTopLeft( 20f/Screen.height, 960f/Screen.width );
        progressBar_Base.resizeTextureOnChange = true;
        progressBar_Base.value = 1f;

        //		debugString = "";
        // Progress/Health bar
        progressBar_Culture = UIProgressBar.create( buttonToolkit,"UI_Ball.png", 0, 0,false,1 );
        //progressBar_Culture = UIProgressBar.create( "UI_Ball.png", 0, 0 );
        //progressBar.positionFromLeft
        //progressBar_Culture.positionFromTopRight( .17f, .40f );
        progressBar_Culture.positionFromTopLeft(  30f/Screen.height,   685f/Screen.width);

        progressBar_Culture.resizeTextureOnChange = true;
        progressBar_Culture.value = 0.0f;

        progressBar_Healtth = UIProgressBar.create(buttonToolkit, "UI_Ball.png", 0, 0 ,true,1 );
        progressBar_Healtth.positionFromTopLeft(30f/Screen.height, 830f/Screen.width);
        progressBar_Healtth.resizeTextureOnChange = true;
        progressBar_Healtth.value = 1.0f;

        progressBar_Science = UIProgressBar.create(buttonToolkit, "UI_Ball.png", 0, 0,true,1  );
        //progressBar_Science.positionFromBottomLeft( .15f, .02f );
        progressBar_Science.positionFromTopLeft(30f/Screen.height, 916f/Screen.width );
        progressBar_Science.resizeTextureOnChange = true;
        progressBar_Science.value = 1.0f;

        //StartCoroutine( animateProgressBar( progressBar_Culture ) );

        UIText_Era = new UIText( textToolkit, "prototype", "prototype.png" );
        TextUI_ERA = UIText_Era.addTextInstance( m_ERA_NAMEDic[  m_currentERA ], 0, 0 );
        //helloText.positionFromTopLeft( 0.1f, 0.05f );
        TextUI_ERA.positionFromTopLeft( 0.1f, 0.05f );
    }