Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        click = null;
        //gold.text = "100";
        mCamera = mainCamera.GetComponent<Camera>();
        itemDescriptionPanel = GameObject.Find("ButtonDescriptionPanel");
        itemDescriptionText = GameObject.Find("ButtonDescriptionText").GetComponent<Text>();
        damageText = GameObject.Find("DamageText").GetComponent<Text>();
        inventory = GameObject.Find("InventoryPanel").GetComponent<InventoryScript>();
        gold = GameObject.Find("GoldText").GetComponent<Text>();
        baseHealth = GameObject.Find("BaseHealthText").GetComponent<Text>();
        DeactivateInfo();

        click = GameObject.Find("NinjaContainer").GetComponent<WarriorAnimation>();
        click.SetSelectedCircle(true);
        healthText.text = (int)click.getCurrentHealth() + "/" + (int)click.getMaxHealth();
        manaText.text = click.getCurrentMana() + "/" + click.getMaxMana();
        name.text = click.getName();
        picture.sprite = click.getPicure();
        actionInspector.AddAllButtons(click.getButtons());

        if ( click is WarriorAnimation ) {
            damageText.text = "Damage: " + ((WarriorAnimation) click).Attack.Damage;
        }
        experienceBar.maxValue = click.getMaxExp();
        experienceBar.value = click.getCurrentExp();
        levelAndClassText.text = "Level " +click.getCurrentLevel() + " " + click.getClassName();
    }