Esempio n. 1
0
    public override void SetSimulationProp(Circuit sim)
    {
        Debug.Log("activeItem inserted");

        _ledDiodeComponent = sim.Create <LEDElm>();

        Connectors[0].DllConnector = _ledDiodeComponent.leadOut;
        Connectors[1].DllConnector = _ledDiodeComponent.leadIn;
    }
Esempio n. 2
0
    // 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();
        }
    }