Basic Unity Scripts


using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class PlayerController : MonoBehaviour {
public GameObject[] prefabs;

public float speed;
public Vector3 jump;
public Text countText;
public Text winText;

private Rigidbody rb;
private int count;

getting an rss feed in lua


--https://stackoverflow.com/questions/18222190/lua-parsing-xml-from-a-url?rq=1

f=io.popen("curl -s http://www.barnettech.com/rss.xml"); C=f:read"*a"; f:close()

function get(data,name)
return data:match("<"..name..">(.-)")
end

print(C)
-- assumes C contains the downloaded contents
print(get(C,"title"))
print(get(C,"pubDate"))