Esempio n. 1
0
    /////////////////////////////////////////////////////////////////////////////

    void Start()
    {
        //Map the GameObject to refference the Main Script
        scripting_GameObject  = GameObject.Find("Scripting");
        mainCamera_GameObject = GameObject.Find("Main Camera");

        cam_Script  = mainCamera_GameObject.GetComponent <MyOwnCamera>();
        main_Script = scripting_GameObject.GetComponent <MyOwn>();

        whiteCam_position  = new Vector3(-0.25f, 0.5f, 0.35f);
        whiteCam_rotation  = Quaternion.Euler(45, 90, 0);
        cameraRotationTime = 2f;
    }
Esempio n. 2
0
    /////////////////////////////////////////////////////////////////////////////

    void Start()
    {
        //Grab Mats from Resources
        beige_Mat      = Resources.Load("Beige", typeof(Material)) as Material;
        beigeLight_Mat = Resources.Load("BeigeLight", typeof(Material)) as Material;

        //Map the GameObject to refference the UI text
        tile_Text = GameObject.Find("TileSelectedText");

        //Map the GameObject to refference the Main Script
        scripting_GameObject = GameObject.Find("Scripting");
        main_Script          = scripting_GameObject.GetComponent <MyOwn>();
    }
Esempio n. 3
0
    /////////////////////////////////////////////////////////////////////////////

    void Start()
    {
        //Fetch the Material from the Renderer of the GameObject
        originalMaterial_Mat = GetComponent <Renderer>().material;

        //Grab the highlighted versions of each Mat
        blackLight_Mat = Resources.Load("BlackLight", typeof(Material)) as Material;
        greyLight_Mat  = Resources.Load("GreyLight", typeof(Material)) as Material;

        //Map the GameObject to refference the UI text
        tile_Text = GameObject.Find("TileSelectedText");

        //Map the GameObject to refference the Main Script
        scripting_GameObject = GameObject.Find("Scripting");
        main_Script          = scripting_GameObject.GetComponent <MyOwn>();

        //Find SFX Audio by Resources folder
        unit_AudioSource = GetComponent <AudioSource>();
        emptyTile_SFX    = Resources.Load("Empty", typeof(AudioClip)) as AudioClip;
    }