Exemplo n.º 1
0
    private void Start()
    {
        GameObject movementGuide = Instantiate(m_unitMovementGuidePrefab);

        m_unitMovementGuide = movementGuide.GetComponent <UnitMovementGuide>();

        GameObject shootingGuide = Instantiate(m_unitShootingGuidePrefab);

        m_unitShootingGuide = shootingGuide.GetComponent <UnitShootingGuide>();
    }
Exemplo n.º 2
0
    public void StartUnitShooting(Action unitShootingComplete, Action unitShootingCancelled)
    {
        Debug.Log("Started Shooting");

        m_unitShootingComplete  = unitShootingComplete;
        m_unitShootingCancelled = unitShootingCancelled;

        if (!m_playerCamera)
        {
            m_playerCamera = m_unitView.PlayerView.PlayerCamera;
        }

        if (m_unitShootingGuide == null)
        {
            m_unitShootingGuide = UnitManager.UnitShootingGuide;
        }

        this.gameObject.layer = LayerMask.NameToLayer("Ignore Raycast");
        this.enabled          = true;
    }