示例#1
0
    void Start()
    {
        base.Start();
        gui             = new GUIEntity();
        gui.name        = "";
        gui.displayHelp = true;
        //public int currentInputType;
        //public bool displayHelp = true;

        //Text[] textGui;
        //new private string name = "";
        //Slider healthBar;

        //float endTime;



        level                  = new Level();
        level.score            = 0;
        level.message          = "";
        level.time             = Time.time;
        gui.textGui            = gameObject.GetComponentsInChildren <Text>();
        gui.healthBar          = gameObject.GetComponentInChildren <Slider>();
        gui.healthBar.maxValue = 100;
        gui.healthBar.minValue = 0;
        gui.textGui[1].text    = level.score.ToString();
        completeView.SetActive(false);
        failedView.SetActive(false);
        startCard.SetActive(false);
        messageView.SetActive(false);
        controls.gameObject.GetComponent <Animator>().SetBool("display", true);
        gui.displayHelp = true;
        BossControls.SetActive(false);
    }
示例#2
0
 public override void LoadContent(ContentManager contentManager)
 {
     _gui = new GUIEntity(contentManager.Load <SpriteFont>("Content/font"), _pieceRenderer)
     {
         NextPiece = _nextPiece,
         Score     = _score
     };
     AddEntity(_gui);
 }