当前位置: 首页>>代码示例>>C#>>正文


C# UIProgressBar.positionFromTopLeft方法代码示例

本文整理汇总了C#中UIProgressBar.positionFromTopLeft方法的典型用法代码示例。如果您正苦于以下问题:C# UIProgressBar.positionFromTopLeft方法的具体用法?C# UIProgressBar.positionFromTopLeft怎么用?C# UIProgressBar.positionFromTopLeft使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIProgressBar的用法示例。


在下文中一共展示了UIProgressBar.positionFromTopLeft方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

    // 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 );
    }
开发者ID:chenaho,项目名称:Unity3d_3M,代码行数:40,代码来源:MainGameWorld.cs


注:本文中的UIProgressBar.positionFromTopLeft方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。