Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        GameObject gamestateGO = GameObject.FindGameObjectWithTag("Gamestate");

        gamestate = gamestateGO.GetComponent <Gamestate>();

        GameObject canvasGO = GameObject.FindGameObjectWithTag("MainCamera");

        canvas = canvasGO.GetComponent <PixelArtistCanvas>();

        if (!GetComponent <NetworkView>().isMine)
        {
            return;
        }

        gamestate.chat = new string[gamestate.chat_max_count];

        for (int i = 0; i < gamestate.chat_max_count; i++)
        {
            gamestate.chat[i] = "";
        }

        lastMousePos = Vector2.zero;
        curMousePos  = Vector2.zero;
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        GameObject gamestateGO = GameObject.FindGameObjectWithTag("Gamestate");
        gamestate = gamestateGO.GetComponent<Gamestate>();

        GameObject canvasGO = GameObject.FindGameObjectWithTag("MainCamera");
        canvas = canvasGO.GetComponent<PixelArtistCanvas>();

        if(!GetComponent<NetworkView>().isMine)
            return;

        gamestate.chat = new string[gamestate.chat_max_count];

        for(int i = 0; i < gamestate.chat_max_count; i++)
        {
            gamestate.chat[i] = "";
        }

        lastMousePos = Vector2.zero;
        curMousePos = Vector2.zero;
    }