Ejemplo n.º 1
0
    void Start()
    {
        if (weapon == null)
        {
            weapon = Resources.Load <Weapon>("Data/Items/Weapons/Fists");
        }

        player        = GameManager.player;
        currentHealth = maxHealth;

        playerAnimator = player.GetComponentInChildren <Animator>();
        animator       = this.GetComponentInChildren <Animator>();

        //request UI healthbar etc
        this.GetComponent <ActorHealthbar>().Initialize(this);

        OnHealthChanged(currentHealth, maxHealth);
    }