Advertisement
AndrewRosyaev

PlayerAnimSetup.cs 6

Dec 9th, 2015
566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.Networking;
  4.  
  5. public class PlayerAnimSetup : NetworkBehaviour {
  6.  
  7.     public GameObject CameraTr;
  8.  
  9.     void Start ()
  10.     {
  11.         EnablePlayer ();
  12.     }
  13.  
  14.     public void EnablePlayer()
  15.     {
  16.         if(isLocalPlayer)
  17.         {
  18.             CameraTr.SetActive(true);
  19.             GetComponent<PlayerHeadControl>().enabled = true;
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement