Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        //Screen.lockCursor = true;

        //_target = GetComponent<Targeting> ();

        //controllerScript = photonView.gameObject.GetComponent<ThirdPersonControllerNET>();

        _healthScript = GetComponent <HealthAndDamageNET> ();
    }
Beispiel #2
0
    void reSpawn()
    {
        _spawnPoints = GameObject.FindGameObjectsWithTag("spawnPoint");

        GameObject _mySpawnPoint = _spawnPoints[Random.Range(0, _spawnPoints.Length)];

        controllerScript = photonView.gameObject.GetComponent <ThirdPersonControllerNET>();

        _healthScript = GetComponent <HealthAndDamageNET> ();


        _healthScript.health = 100.0f;

        _imDead = false;

        controllerScript.enabled = true;

        gameObject.transform.position = _mySpawnPoint.transform.position;

        photonView.RPC("reSpawned", PhotonTargets.AllBuffered);
    }
    // Use this for initialization
    void Start()
    {
        //Screen.lockCursor = true;

        //_target = GetComponent<Targeting> ();

        //controllerScript = photonView.gameObject.GetComponent<ThirdPersonControllerNET>();

        _healthScript = GetComponent<HealthAndDamageNET> ();
    }
    void reSpawn()
    {
        _spawnPoints = GameObject.FindGameObjectsWithTag("spawnPoint");

        GameObject _mySpawnPoint = _spawnPoints[Random.Range(0, _spawnPoints.Length)];

        controllerScript = photonView.gameObject.GetComponent<ThirdPersonControllerNET>();

        _healthScript = GetComponent<HealthAndDamageNET> ();

        _healthScript.health = 100.0f;

        _imDead = false;

        controllerScript.enabled = true;

        gameObject.transform.position = _mySpawnPoint.transform.position;

        photonView.RPC("reSpawned", PhotonTargets.AllBuffered);
    }