Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        GetComponent <customCharController>().OnHPpctsChanged += HandleHPChange;

        source   = GetComponent <AudioSource>();
        amscript = GameObject.Find("AudioManagerCust").GetComponent <CustomAudioManager>();
    }
Ejemplo n.º 2
0
    void Awake()
    {
        _psystem = GetComponent <ParticleSystem>();

        source   = GetComponent <AudioSource>();
        amscript = GameObject.Find("AudioManagerCust").GetComponent <CustomAudioManager>();
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        GetComponent <customCharController>().OnAttack += HandleAttack;
        anim = GetComponent <Animator>();

        source   = GetComponent <AudioSource>();
        amscript = GameObject.Find("AudioManagerCust").GetComponent <CustomAudioManager>();
    }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start () {
        im = GameObject.FindGameObjectWithTag("message").GetComponent<InformationMessage>();
        GetComponent<customCharController>().OnDie += HandleDying;
       anim = GetComponent<Animator>();

        source = GetComponent<AudioSource>();
        amscript = GameObject.Find("AudioManagerCust").GetComponent<CustomAudioManager>();
    }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        health = maxHealth;
        agent  = GetComponentInParent <UnityEngine.AI.NavMeshAgent>();
        anim   = GetComponentInParent <Animator>();

        source   = GetComponent <AudioSource>();
        amscript = GameObject.Find("AudioManagerCust").GetComponent <CustomAudioManager>();
    }
Ejemplo n.º 6
0
 void Start()
 {
     _player           = GameObject.Find("Player");
     _playerResources  = _player.GetComponent <PlayerResources>();
     _playerExperience = _player.GetComponent <PlayerExperience>();
     resourceQuantity  = maxQuantity + Convert.ToInt32(UnityEngine.Random.Range(-maxQuantity * 0.3f, maxQuantity * 0.3f));
     _animator         = _player.GetComponent <Animator>();
     audioManager      = GameObject.FindGameObjectWithTag("AudioManager").GetComponent <CustomAudioManager>();
     _playerEq         = _player.GetComponent <PlayerEquipment>();
 }
Ejemplo n.º 7
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        DontDestroyOnLoad(gameObject);

        /*
         * initializeSounds(meleeSounds);
         * initializeSounds(arrowSounds);
         * initializeSounds(dieSounds);
         * initializeSounds(footstepsSounds);
         * initializeSounds(cutSounds);
         * initializeSounds(tauntSounds);*/
    }