示例#1
0
 public override void PreStartClient()
 {
     audioSource           = GetComponent <AudioSource>();
     audioSync             = GetComponent <AudioSync>();
     firstPersonController = GetComponent <FirstPersonController>();
     firstPersonCamera     = cameraTransform.GetComponent <Camera>();
     scoreScript           = GetComponent <Player_Score>();
 }
 // Start is called before the first frame update
 void Start()
 {
     _money                  = PlayerPrefs.GetInt("Money");
     DamagePercent           = 0;
     _gameManager            = GameObject.Find("GameManager").GetComponent <GameManager>();
     _vThirdPersonController = this.gameObject.GetComponent <vThirdPersonController>();
     _audioSync              = this.gameObject.GetComponent <AudioSync>();
     _playerName             = this.gameObject.GetComponent <PlayerName>();
 }
示例#3
0
    //Initialize on start
    void Start()
    {
        navmeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>();
        animator     = GetComponentInChildren <Animator> ();
        audioSync    = GetComponent <AudioSync> ();


        GameObject.FindGameObjectWithTag("Greet").GetComponentInChildren <Text> ().text      = "ASK";
        GameObject.FindGameObjectWithTag("ThankButton").GetComponentInChildren <Text>().text = "THANK";
    }
示例#4
0
 private void Start()
 {
     if (cam == null)
     {
         Debug.LogError("PlayerShoot: No camera referenced!");
         this.enabled = false;
     }
     audioSync        = gameObject.GetComponent <AudioSync>();
     playerMotor      = gameObject.GetComponent <PlayerMotor>();
     playerUIInstance = gameObject.GetComponent <PlayerSetup>().playerUIInstance;
 }
示例#5
0
 void Start()
 {
     myTransform  = transform;
     targetScript = GetComponent <Zombie_Target>();
     audioSync    = GetComponent <AudioSync>();
     if (isServer)
     {
         StartCoroutine(Attack());
         StartCoroutine(Bellow());
     }
 }
        protected virtual void Start()
        {
            _animator        = GetComponent <Animator>();
            _audioSync       = GetComponent <AudioSync>();
            _particleSync    = GetComponent <ParticleSync>();
            _forceSync       = GetComponent <ForceSync>();
            _playerGameRules = GetComponent <PlayerGameRules>();
            _playerName      = GetComponent <PlayerName>();
            _gameManager     = GameObject.Find("GameManager").GetComponent <GameManager>();
            _UI = GameObject.Find("UI");
            // Instead of syncing the name upon connecting, just do this
            InvokeRepeating("SyncName", 1f, 5f);

#if !UNITY_EDITOR
            Cursor.visible = false;
#endif
        }
示例#7
0
    // Start is called before the first frame update
    void Start()
    {
        _textDisplays = GameObject.FindGameObjectsWithTag("Elevator text");

        if (isServer)
        {
            this.GameManager = GameObject.Find("GameManager").GetComponent <GameManager>();
            _arenaDoor       = GameObject.FindGameObjectWithTag("Elevator arena door");
            _entranceDoor    = GameObject.FindGameObjectWithTag("Elevator back door");
            _bottomPlatform  = GameObject.Find("Elevator floor");
            _audioSync       = this.gameObject.GetComponent <AudioSync>();
            _rigidBody       = this.gameObject.GetComponent <Rigidbody>();
            _state           = ElevatorState.WaitingForPlayers;
            _startPos        = this.gameObject.transform.position;
            _endPos          = this.gameObject.transform.position + new Vector3(0, 0, -20);
        }
    }
示例#8
0
 // Use this for initialization
 void Start()
 {
     audioSync = GetComponent <AudioSync>();
 }
示例#9
0
 //Used to initialize values
 void Start()
 {
     animator  = GetComponentInChildren <Animator> ();
     audioSync = GetComponent <AudioSync> ();
 }
示例#10
0
 private void Start()
 {
     _audioSync = GetComponent <AudioSync>();
     _gameState = GameState.Waiting;
     _random    = new System.Random();
 }
示例#11
0
    private Animator animator;            //Reference to animator

    //Used to initialize values
    void Start()
    {
        animator  = GetComponentInChildren <Animator> ();
        audioSync = GetComponent <AudioSync> ();
        GameObject.FindGameObjectWithTag("Kick").GetComponentInChildren <Text> ().text = "KICK";
    }
示例#12
0
 // Use this for initialization
 void Start()
 {
     audioSync = GameObject.Find("Audio Manager").GetComponent <AudioSync>();
 }
示例#13
0
 void Start()
 {
     audioSync  = GameObject.FindGameObjectWithTag("AudioController").GetComponent <AudioSync>();
     controller = GetComponent <StateController>();
 }
示例#14
0
 //Initialiize variables
 void Start()
 {
     audioSync  = GetComponent <AudioSync> ();
     agentSpeed = GetComponent <UnityEngine.AI.NavMeshAgent>().speed;
     Invoke("SetInitializeTrigger", 3f);
 }