예제 #1
0
파일: Pickup.cs 프로젝트: eliotcowley/Quest
 // Use this for initialization
 void Start()
 {
     coinText.text = "0";
     playerAttack  = GetComponent <PlayerAttack>();
     sfxMixer      = SFXMixer.instance;
     sfxAudio      = sfxMixer.GetComponent <AudioSource>();
 }
예제 #2
0
    private void Start()
    {
        audioSources = GetComponents <AudioSource>();

        if (instance != null)
        {
            Debug.LogError("ERROR: More than one SFXMixer in scene");
        }
        else
        {
            instance = this;
        }
    }
예제 #3
0
 private void Start()
 {
     isAttacking         = false;
     swordsmanAnimator   = swordsman.GetComponent <Animator>();
     princessAnimator    = princess.GetComponent <Animator>();
     swordsmanMaterial   = swordsman.GetComponent <Renderer>().material;
     princessMaterial    = princess.GetComponent <Renderer>().material;
     hurtFlashSeconds    = new WaitForSeconds(hurtFlashTime);
     invincibleParticles = GetComponentInChildren <ParticleSystem>();
     beatCount           = invincibleBeats;
     swordsmanInFront    = true;
     sfxMixer            = SFXMixer.instance;
     playerMovement      = GetComponent <PlayerMovement>();
 }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        currentHealth = maxHealth;
        hearts        = new List <GameObject>();
        List <Transform> transforms = heartStartingPosition.GetComponentsInChildren <Transform>().ToList();

        hearts = transforms.Select(t => t.gameObject)
                 .Where(t => t.GetInstanceID() != heartStartingPosition.GetInstanceID())
                 .ToList();

        hearts.Sort((x, y) => string.Compare(x.name, y.name));
        //Debug.Log(string.Join(",", hearts.Select(h => h.name).ToArray()));
        UpdateHearts();
        //Debug.Log("Number of controllers detected: " + Input.GetJoystickNames().Length);
        sfxMixer = SFXMixer.instance;
    }
예제 #5
0
 private void Start()
 {
     pool     = GameObject.FindGameObjectWithTag(gameManagerTag).GetComponent <ObjectPool>();
     sfxMixer = GameObject.FindGameObjectWithTag(sfxMixerTag).GetComponent <SFXMixer>();
 }