//GameObject otherName;

    void Awake()
    {
        cameraScript     = GetComponent <ThirdPersonCameraNET>();
        controllerScript = GetComponent <ThirdPersonControllerNET>();
        targetScript     = GetComponent <Targeting> ();
        playerScript     = GetComponent <myCharacterScript> ();
    }
 //GameObject otherName;
 void Awake()
 {
     cameraScript = GetComponent<ThirdPersonCameraNET>();
     controllerScript = GetComponent<ThirdPersonControllerNET>();
     targetScript = GetComponent<Targeting> ();
     playerScript = GetComponent<myCharacterScript> ();
 }
Пример #3
0
    void onDeath()
    {
        _imDead = true;
        photonView.RPC("Died", PhotonTargets.AllBuffered);

        controllerScript         = photonView.gameObject.GetComponent <ThirdPersonControllerNET>();
        controllerScript.enabled = false;
    }
Пример #4
0
    //SetFriendParty setScript;

    void Awake()
    {
        cameraScript     = GetComponent <ThirdPersonCameraNET>();
        controllerScript = GetComponent <ThirdPersonControllerNET>();
        healthScript     = GetComponentInChildren <Health>();
        scoreScript      = GetComponent <Highscore>();
        meleeScript      = GetComponentInChildren <Melee>();
        dmgScript        = GetComponent <Damage>();
        // setScript = GetComponent<SetFriendParty>();
    }
Пример #5
0
 // Use this for initialization
 void Start()
 {
     scriptSpeed   = gameObject.GetComponentInParent <ThirdPersonControllerNET> ();
     isLifting     = false;
     isWalking     = false;
     isJumping     = false;
     isRunning     = false;
     contIsJumping = 2f;
     anim          = gameObject.GetComponent <Animator> ();
 }
Пример #6
0
 /// <summary>
 /// On configure les comportements de saut et les variables
 /// </summary>
 void Start()
 {
     Setup(); // Retry setup if references were cleared post-add
     if (VerifySetup())
     {
         controller         = GetComponent <ThirdPersonControllerNET>();
         controller.onJump += OnJump;
         // Have OnJump invoked when the ThirdPersonController starts a jump
         currentRotation = 0.0f;
     }
 }
    void Awake()
    {
        //Setting Components
        thirdPersonController = GetComponent <ThirdPersonControllerNET>();
        capsuleCollider       = GetComponent <CapsuleCollider>();

        //Getting the exact healthbar
        guiHealthbar  = this.gameObject.transform.GetChild(3).GetChild(1).GetChild(0).gameObject;
        healthSlider  = guiHealthbar.GetComponent <Slider>();
        anim          = GetComponent <Animator>();
        playerAudio   = GetComponent <AudioSource>();
        currentHealth = startingHealth;
    }
Пример #8
0
	// Use this for initialization
	void Start ()
	{
		flagTrigger = false;
		posRazorz = 0f;
		flagCarRazor = false;
		pointSitting = GameObject.Find ("pointSitting");
		scriptMove = gameObject.GetComponent<ThirdPersonControllerNET> ();
		flagTriggerCar = false;
		contCarCamera = 0;
		ObjectcarCamera = GameObject.FindGameObjectWithTag ("RCCMainCamera");
		carCamera = ObjectcarCamera.GetComponent<Camera> ();
		ObjectcarControl = GameObject.Find ("Buggy");
		CarControl = ObjectcarControl.GetComponent<RCCCarControllerV2> ();
	}
Пример #9
0
	void Start ()
	// Verify setup, configure
	{
		Setup ();
			// Retry setup if references were cleared post-add
			
		if (VerifySetup ())
		{
			controller = GetComponent<ThirdPersonControllerNET> ();
			controller.onJump += OnJump;
				// Have OnJump invoked when the ThirdPersonController starts a jump
			currentRotation = 0.0f;
			lastRootForward = root.forward;
		}
	}
Пример #10
0
    void Awake()
    {
        anim          = GetComponent <Animator>();
        guiHealthbar  = this.gameObject.transform.GetChild(3).GetChild(1).GetChild(0).gameObject;
        guiKills      = this.gameObject.transform.GetChild(3).GetChild(1).GetChild(1).gameObject;
        guiDeaths     = this.gameObject.transform.GetChild(3).GetChild(1).GetChild(2).gameObject;
        guiStaminaBar = this.gameObject.transform.GetChild(3).GetChild(2).GetChild(0).gameObject;

        cameraScript          = GetComponent <ThirdPersonCameraNET>();
        controllerScript      = GetComponent <ThirdPersonControllerNET>();
        characterController   = GetComponent <CharacterController>();
        mecanim_Control_Melee = GetComponent <Mecanim_Control_melee>();

        //New Scripts
        playerHealth = GetComponent <PlayerHealth>();
        blocking     = GetComponent <Blocking>();
    }
Пример #11
0
    void Start()
    // Verify setup, configure
    {
        photonView   = PhotonView.Get(this);
        photonViewID = photonView.viewID;


        Setup();
        // Retry setup if references were cleared post-add

        if (VerifySetup())
        {
            controller         = GetComponent <ThirdPersonControllerNET> ();
            controller.onJump += OnJump;
            // Have OnJump invoked when the ThirdPersonController starts a jump
            currentRotation = 0.0f;
            lastRootForward = root.forward;
        }
    }
Пример #12
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);
    }
    void onDeath()
    {
        _imDead = true;
        photonView.RPC("Died", PhotonTargets.AllBuffered);

        controllerScript = photonView.gameObject.GetComponent<ThirdPersonControllerNET>();
        controllerScript.enabled = false;
    }
Пример #14
0
    // Use this for initialization
    void Start()
    {
        ReadyCount = 0;
        isWaitingForNextStage = PlayersHaveReachedEnd = false;

        isBuilderAtEnd = false;
        isMoverAtEnd = false;
        isJumperAtEnd = false;
        isViewerAtEnd = false;

        nextLevel = GameManagerVik.nextLevel;
        currGameManager = GameObject.Find("Code").GetComponent<GameManagerVik>();
        currController = GameObject.Find("Code").GetComponent<ThirdPersonControllerNET>();

        //last level check
        if (nextLevel > (Application.levelCount - 1))
            nextLevel = -1;

        //Debug.Log("nextLevel at start = "+nextLevel);
    }
Пример #15
0
    private Quaternion correctPlayerRot = Quaternion.identity; //We lerp towards this

    #endregion Fields

    #region Methods

    void Awake()
    {
        cameraScript = GetComponent<ThirdPersonCameraNET>();
        controllerScript = GetComponent<ThirdPersonControllerNET>();
    }
Пример #16
0
 void Awake()
 {
     cameraScript     = GetComponent <ThirdPersonCameraNET>();
     controllerScript = GetComponent <ThirdPersonControllerNET>();
 }
    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);
    }
    // Verify setup, configure
    void Start()
    {
        photonView = PhotonView.Get(this);
         	 photonViewID = photonView.viewID;

        Setup ();
            // Retry setup if references were cleared post-add

        if (VerifySetup ())
        {
            controller = GetComponent<ThirdPersonControllerNET> ();
            controller.onJump += OnJump;
                // Have OnJump invoked when the ThirdPersonController starts a jump
            currentRotation = 0.0f;
            lastRootForward = root.forward;
        }
    }