Exemple #1
0
    // Use this for initialization
    void Start()
    {
        mouseLook = Camera.mainCamera.GetComponent<MouseLook>();
        mouseFollow = Camera.mainCamera.GetComponent<SmoothFollowCS>();
        //set camera
        mouseFollow.enabled = false;
        mouseFollow.target = gameObject.transform;
        mouseFollow.targetLocation = gameObject.transform.position;
        sender = GetComponent<NetworkLaunchMessageSender>();

        //GUI initializers
        owners = new List<int>();
        myGUI = this.GetComponent<PlayerGUI>();
        guiText = (GUIText)GameObject.Find("GUI Text").GetComponent<GUIText>();
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        mouseLook = Camera.mainCamera.GetComponent<MouseLook>();
        mouseFollow = Camera.mainCamera.GetComponent<SmoothFollowCS>();
        //set camera
        mouseFollow.enabled = false;
        mouseFollow.target = gameObject.transform;
        mouseFollow.targetLocation = gameObject.transform.position;
        sender = GetComponent<NetworkLaunchMessageSender>();

        //GUI initializers
        owners = new List<int>();
        myGUI = this.GetComponent<PlayerGUI>();
        distGUI = (GUIText)GameObject.Find("GUI Text Distance").GetComponent<GUIText>();
        paintGUI = (GUIText)GameObject.Find("GUI Text Paint").GetComponent<GUIText>();
        crosshairGUI = (GUITexture)GameObject.Find("Crosshair Outer").GetComponent<GUITexture>();
        crosshairGUI.color = color;

        GameObject gameMan = GameObject.Find("GameManager");
        gManScript = gameMan.GetComponent<GameManager>();
        refuel();
    }