Exemple #1
0
    void Start()
    {
        sas  = GetComponent <SwingAudioSource>();
        has  = GetComponent <HitAudioSource>();
        mas  = GetComponent <MovementAudioSource>();
        ps   = GetComponent <PlayerState>();
        rb   = GetComponent <Rigidbody2D>();
        anim = GetComponent <Animator>();

        if (GameController.Instance.player_shield != -1)
        {
            shields[GameController.Instance.player_shield].GetComponent <Collider2D>().enabled = false;
        }
        else
        {
            try
            {
                dfsBtn.interactable = false;
            }
            catch
            {
            }
        }

        playerSpeed = startAgility + GameController.Instance.player_agility / 10f;

        // StartCoroutine(SetPersonSize());

        SetPlayerSpeed(0);
    }
    void Start()
    {
        mas = GetComponent <MovementAudioSource>();
        has = GetComponent <HitAudioSource>();
        sas = GetComponent <SwingAudioSource>();

        died = false;

        eh = this.GetComponent <BrigandHealth>();
        ea = this.GetComponent <BrigandArmour>();
        es = this.GetComponent <EnemySkill>();

        StartCoroutine(SetSpeedBoost());

        StartCoroutine(SetAttackDistance());

        StartCoroutine(SetPersonSize());

        defensed   = false;
        isAttacked = false;
        rb         = GetComponent <Rigidbody2D>();
        anim       = GetComponent <Animator>();

        // InvokeRepeating("FindPlayer", 0, 1);
    }
    void Start()
    {
        mas  = GetComponent <MovementAudioSource>();
        sas  = GetComponent <SwingAudioSource>();
        has  = GetComponent <HitAudioSource>();
        died = false;

        eh = this.GetComponent <SpearmanHealth>();
        ea = this.GetComponent <SpearmanArmour>();
        es = this.GetComponent <EnemySkill>();

        StartCoroutine(SetSpeedBoost());

        StartCoroutine(SetAttackDistance());

        StartCoroutine(SetPersonSize());

        defensed   = false;
        isAttacked = false;
        rb         = GetComponent <Rigidbody2D>();
        anim       = GetComponent <Animator>();
        StartCoroutine(SetSpear());
    }