private void giveMod(iModuleHost host) { var mod = createMod(); host.registerModule(mod); mod.registerHost(host); }
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); } }
private void removeCurrentMod(iModuleHost host) { host.resetModule(); }
public ModulationType?getHostModulatorType(iModuleHost modhost) { return(modhost.getModuleType()); }
public virtual void registerHost(iModuleHost hostobj) { host = hostobj; }