Jump to content

Recommended Posts

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

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 by iMod
Link to comment
https://wrobot.eu/forums/topic/7970-questioncustomclass/#findComment-36621
Share on other sites

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

Link to comment
https://wrobot.eu/forums/topic/7970-questioncustomclass/#findComment-36649
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...