Beispiel #1
0
    public void BlockRegister(GameObject block)
    {
        string      netID     = block.GetComponent <Block>().net_id;
        NetUnitData blockinfo = new NetUnitData(netID, block);

        //Debug.Log(netID + " " + blockinfo.fpos);
        lock (blocks) blocks.Add(netID, block);
        lock (blocksinfo) blocksinfo.Add(netID, blockinfo);
    }
Beispiel #2
0
    public void PlayerRegister(GameObject player)
    {
        string      netID      = player.GetComponent <PlayerController>().netID;
        NetUnitData playerinfo = new NetUnitData(netID, player);

        //Debug.Log("Register: " + netID);
        lock (players) players.Add(netID, player);
        lock (playersinfo) playersinfo.Add(netID, playerinfo);
    }