iMod 99 Posted December 11, 2017 Share Posted December 11, 2017 Hello, is there a way to call the start method of a fight class by our self or is it just possible atm with the fight class engine? if so it would be nice if there would be a way to pulse the Start method since the engine is kinda overloaded and i want to start my fight class without all those extra "stuff". thanks in advance, iMod Link to comment https://wrobot.eu/forums/topic/7970-questioncustomclass/ Share on other sites More sharing options...
Droidz 2739 Posted December 13, 2017 Share Posted December 13, 2017 Salut, tu peux donner plus de détails sur ce que tu veux faire, j'ai du mal à comprendre Link to comment https://wrobot.eu/forums/topic/7970-questioncustomclass/#findComment-36614 Share on other sites More sharing options...
iMod 99 Posted December 13, 2017 Author Share Posted December 13, 2017 (edited) 2 hours ago, Droidz said: Salut, tu peux donner plus de détails sur ce que tu veux faire, j'ai du mal à comprendre Hi, I made a own product and i want to start the loaded fight class with my product without your fight engine but i found no way to do that. For example "CustomClass.Start();" Edited December 13, 2017 by iMod Link to comment https://wrobot.eu/forums/topic/7970-questioncustomclass/#findComment-36621 Share on other sites More sharing options...
Droidz 2739 Posted December 14, 2017 Share Posted December 14, 2017 Hello, if you use dll fightclass you can: var dllFile = System.IO.File.ReadAllBytes("fightclass.dll"); var assembly = System.Reflection.Assembly.Load(dllFile); var obj = assembly.CreateInstance("Main", false); if (obj is ICustomClass instanceFromOtherAssembly) { instanceFromOtherAssembly.Initialize(); } else you need to use CompileAssemblyFromSource iMod and Matenia 2 Link to comment https://wrobot.eu/forums/topic/7970-questioncustomclass/#findComment-36649 Share on other sites More sharing options...
iMod 99 Posted December 15, 2017 Author Share Posted December 15, 2017 17 hours ago, Droidz said: Hello, if you use dll fightclass you can: var dllFile = System.IO.File.ReadAllBytes("fightclass.dll"); var assembly = System.Reflection.Assembly.Load(dllFile); var obj = assembly.CreateInstance("Main", false); if (obj is ICustomClass instanceFromOtherAssembly) { instanceFromOtherAssembly.Initialize(); } else you need to use CompileAssemblyFromSource Alright thought there will be a other way but this should be enough, thanks :) Link to comment https://wrobot.eu/forums/topic/7970-questioncustomclass/#findComment-36671 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now