public override void SetSimulationProp(Circuit sim) { Debug.Log("activeItem inserted"); _ledDiodeComponent = sim.Create <LEDElm>(); Connectors[0].DllConnector = _ledDiodeComponent.leadOut; Connectors[1].DllConnector = _ledDiodeComponent.leadIn; }
// Called during instantiation public void Awake() { if (CompareTag("ActiveItem")) { if (_ledDiodeEntity == null) { _ledDiodeEntity = new LedDiodeEntity(); } //just for handling null references before we start the simulation _ledDiodeComponent = new LEDElm(); SetAndInitializeConnectors(); } }