Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //in LuaEventOW.cs
- private GameObject ob;
- [CYFEventFunction]
- public void SetAsObject(string name)
- {
- Debug.Log("yaaaaaasssssss!");
- ob = GameObject.Find(name);
- if (ob != null)
- {
- Debug.Log("victory~");
- appliedScript.Call("CYFEventNextCommand");
- return;
- }
- throw new CYFException("Event.SetAsObject: The event \"" + name + "\" doesn't exist.");
- }
- [CYFEventFunction]
- public void IsObjectVisible(bool toggle) {
- Debug.Log("visibleeeeeeeeeeee");
- if (ob != null)
- {
- ob.SetActive(toggle);
- appliedScript.Call("CYFEventNextCommand");
- return;
- }
- throw new CYFException("Event.IsObjectVisible: The event was set to call an invalid object. Did you forget SetAsObject(string name)?");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement