Exemple #1
0
    private void giveMod(iModuleHost host)
    {
        var mod = createMod();

        host.registerModule(mod);
        mod.registerHost(host);
    }
Exemple #2
0
    public override void  onPostSync()
    {
        iModuleHost host = (iModuleHost)scene.syncObjects.Where(x => x.getGameObject().GetComponent <iModuleHost> () != null &&
                                                                x.getGameObject().transform.position.snap() == transform.position.snap()).FirstOrDefault();

        if (host == null)
        {
            return;
        }
        iModuleHost    nonNullHost = (iModuleHost)host;
        ModulationType?hostmodtype = nonNullHost.getModuleType();

        if (hostmodtype != modType)
        {
            removeCurrentMod(nonNullHost);
            giveMod(nonNullHost);
        }
    }
Exemple #3
0
 private void removeCurrentMod(iModuleHost host)
 {
     host.resetModule();
 }
Exemple #4
0
 public ModulationType?getHostModulatorType(iModuleHost modhost)
 {
     return(modhost.getModuleType());
 }
Exemple #5
0
 public virtual void registerHost(iModuleHost hostobj)
 {
     host = hostobj;
 }