Beispiel #1
0
    private void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Player       player = null;
            GameObject   go     = Click();
            ZappyObjects inv    = null;

            if (go != null)
            {
                if (go.tag == "Player")
                {
                    player = go.GetComponent <Player>();
                    if (player != null)
                    {
                        net.Send("pin " + player.id.ToString() + "\n");
                        inv = player.inventory;
                    }
                }
                else
                {
                    ZappyCell cell = go.GetComponent <ZappyCell>();
                    net.Send("bct " + cell.gridPos.x + " " + cell.gridPos.y + "\n");
                    inv = cell.inventory;
                }
                if (inv != null)
                {
                    invUI.go = go;
                    invUI.activeInventory = inv;
                }
            }
        }
    }
Beispiel #2
0
 public void UpdateFrequency()
 {
     net.Send("sst " + (int)slider.value + "\n");
 }