Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        laserCannon = GameObject.Find("mobileCannoX").GetComponent <CannonMovement>();

        if (PlayerController.instance != null)
        {
            player = PlayerController.instance.transform;
        }
    }
Пример #2
0
    //............................................................
    //.................................................. * START *
    void Start()
    {
        GameObject cannonObject = GameObject.FindGameObjectWithTag("Cannon");

        m_Cannon = cannonObject.GetComponent <CannonMovement>();

        //fx_CannonFire.gameObject.SetActive(false);
        //fx_CannonLight.gameObject.SetActive(false);
    }
    //............................................................
    //.................................................. * START *
    void Start()
    {
        GameObject spawnerObject = GameObject.FindGameObjectWithTag("Spawner");

        m_Spawner = spawnerObject.GetComponent <Spawner>();

        GameObject cannonObject = GameObject.FindGameObjectWithTag("Cannon");

        m_CannonMovement = cannonObject.GetComponent <CannonMovement>();
    }
    //............................................................
    //.................................................. * START *
    void Start()
    {
        // RAYCAST
        m_LineRenderer = GetComponent <LineRenderer>();
        m_LineRenderer.sharedMaterial = rayMaterial;

        GameObject cannonObject = GameObject.FindGameObjectWithTag("Cannon");

        m_Cannon = cannonObject.GetComponent <CannonMovement>();

        m_Reticle      = Instantiate(m_Reticle) as GameObject;
        m_ReticleFrame = Instantiate(m_ReticleFrame) as GameObject;
    }