예제 #1
0
 void Start()
 {
     enemiesSituation   = GameObject.FindGameObjectWithTag("EnemyHandler").GetComponent <EnemiesSituation>();
     soundAudioSource   = GetComponent <AudioSource>();
     pauseMusicSource   = musicPlayer.GetComponents <AudioSource>()[2];
     animatorBackground = menuBackground.GetComponent <Animator> ();
     animatorButton     = gobackButton.GetComponent <Animator> ();
 }
예제 #2
0
    // Use this for initialization
    protected void Start()
    {
        enemiesSituation = GameObject.FindGameObjectWithTag("EnemyHandler").GetComponent <EnemiesSituation>();
        health           = GetComponent <Health>();
        stateAction      = Patrol;

        patrolPath = GetComponent <PatrolPath>();
        pathfinder = GetComponent <EnemyPathfinder>();
    }
예제 #3
0
    void Start()
    {
        particleSystemPool = GameObject.FindGameObjectWithTag("GameController").GetComponent <ParticleSystemPool>();
        audioSource        = GetComponent <AudioSource>();
        mainCamera         = GameObject.FindGameObjectWithTag("MainCamera");
        enemiesSituation   = GameObject.FindGameObjectWithTag("EnemyHandler").GetComponent <EnemiesSituation>();
        animatorModel      = playerModel.GetComponent <Animator> ();

        if (isLocalPlayer)
        {
            spawnPoints = FindObjectsOfType <NetworkStartPosition>();
        }
    }