static void Main(string[] args) { string path = @"P:\Code\Git\EntityEngine\menu_generated_example.xml"; string xmlData = ""; using (StreamReader sr = new StreamReader(path)) { xmlData = sr.ReadToEnd(); } Parser parser = new Parser(); var menu = parser.ParseXmlDocumentS(xmlData); Component cc = new CameraComponent(); Component child = new ChildrenComponent(); ICameraSystem cs = new CameraSystem(); cs.AddComponent((ICameraComponent)cc); // this will work cs.AddComponent((ICameraComponent)child); // This will not //cs.AddComponent(cc); // This throws compile error //cs.AddComponent(child); // This throws compile error var m = new Moar(); //var mw = m.gen_wam();E }
// Start is called before the first frame update void Start() { childrenContainer = GetComponentInChildren <ChildrenComponent>(); horAxis = $"Horizontal_{playerNumber}"; verAxis = $"Vertical_{playerNumber}"; }