Esempio n. 1
0
    // IMover end

    private void Start()
    {
        m_tileComponent = GetComponent <TileObject>();
        m_direction     = m_tileComponent.Direction;

        m_consumerComponent = GetComponent <EnergyConsumer>();

        m_animator = GetComponent <Animator>();
        if (m_animator != null)
        {
            m_animator.enabled = false;
            m_animationEnabled = false;
        }
        else
        {
            Debug.LogError("Animator is not found for conveyer.");
        }

        DataPublisher publisher = GetComponent <DataPublisher>();

        if (publisher == null)
        {
            Debug.LogWarning("There is no publisher attached to conveyer object!");
            return;
        }

        m_directionPort = new DataPublisher.DataPort("IsReversed");
        m_speedPort     = new DataPublisher.DataPort("Speed");

        publisher.SetPort(m_directionPort);
        publisher.SetPort(m_speedPort);
    }
Esempio n. 2
0
    private void Start()
    {
        DataPublisher publisher = GetComponent <DataPublisher>();

        m_presencePort = new DataPublisher.DataPort("IsDetected");
        publisher.SetPort(m_presencePort);
    }
Esempio n. 3
0
    private void Start()
    {
        DataPublisher publisher = GetComponent <DataPublisher>();

        m_temperaturePort = new DataPublisher.DataPort("Temperature");
        publisher.SetPort(m_temperaturePort);
    }
Esempio n. 4
0
    private void Start()
    {
        m_logger = new LogUtils.DebugLogger("Press");

        m_state    = PressState.Up;
        m_consumer = GetComponent <EnergyConsumer>();
        m_animator = GetComponent <Animator>();

        DataPublisher publisher = GetComponent <DataPublisher>();

        m_pressPort = new DataPublisher.DataPort("IsPressed");
        publisher.SetPort(m_pressPort);
    }