public void ChangeCode(string newCode) { Code = "require 'tilelib'\n" + newCode; LuaEnv.DoString(Code); BindEvent?.Invoke(); UStart?.Invoke(); }
public void Bind(Action <Texture2D> onClick, Texture2D texture) { this.texture = texture; this.onClick = onClick; image.texture = texture; button.onClick.AddListener(Button_OnClick); OnBind.Invoke(texture); }
public void Bind(RoomClient client, IPeer peer, bool isMe) { ClearBinding(); this.roomClient = client; this.peer = peer; this.isMe = isMe; this.peerConnectionManager = VoipPeerConnectionManager.Find(this); OnBind.Invoke(client, peer); }
// Use this for initialization protected void Start() { LuaEnv = new LuaEnv(); BindEvent += Binding; BindEvent += BindLocalMethod; UUpdate += OUpdate; UStart += OStart; BindEvent?.Invoke(); UStart?.Invoke(); }
public void Bind(RoomClient client, IRoom roomInfo) { Name.text = roomInfo.Name; SceneName.text = roomInfo["scene-name"]; var image = roomInfo["scene-image"]; if (image != null && image != existing) { client.GetBlob(roomInfo.UUID, image, (base64image) => { if (base64image.Length > 0) { var texture = new Texture2D(1, 1); texture.LoadImage(Convert.FromBase64String(base64image)); existing = image; ScenePreview.texture = texture; } }); } OnBind.Invoke(client, roomInfo); }