예제 #1
0
        public virtual void Interact(GameObject obj)
        {
            if (Time.realtimeSinceStartup - last_interact_time < interact_protect_time)
            {
                return;
            }
            last_interact_time = Time.realtimeSinceStartup;

            if (script != null)
            {
                if (Character)
                {
                    values [0] = Character.gameObject.transform.localPosition.x.ToString();
                    values [1] = Character.gameObject.transform.localPosition.y.ToString();
                    values [2] = Character.gameObject.transform.localPosition.z.ToString();
                }
                values [3] = Playerid;
                LuaController.DoString(script.bytes, values);
            }
        }
예제 #2
0
 public void OnClick(GameObject obj)
 {
     LuaController.DoString(script.bytes, gameObject, obj);
 }