Example #1
0
 // Use this for initialization
 void Start()
 {
     comp = GetComponent<MiniGameActive>();
     mask = GetComponentInParent<objectHighlightOnMouseover>();
     if ( mask == null )
         Debug.Log( "Yule Log is not parented to an object that has objectHighlightOnMouseover" );
     if ( display == null ) {
         display = (Renderer) GetComponentInChildren<ParticleSystemRenderer> ();
     }
     SetObjectLit();
 }
Example #2
0
    //bool clicked;
    //public Button start;
    //public float b;
    void Start()
    {
        //tree = GameObject.Find ("tree");
        time_passed = 0f;
        total_time = 0f;
        child = GetComponentInChildren<objectHighlightOnMouseover>();

        /*
        start.onClick.AddListener (delegate () {
            this.ButtonClicked ();
        });

        clicked = false;
        */
    }
Example #3
0
    // Basically zoomInToTarget() on originPlanet
    void resetCameraToOrigin()
    {
        orbitTarget.deselect();
        orbitTarget = originPlanet;

        endMarker = orbitTarget.transform;
        startMarker = transform;

        StartCoroutine("smoothDampToPlanet");
    }
Example #4
0
    /*
     * Shoot a raycast from our camera to our mouse location.
     *   If we hit an object, move our camera into it and offset it outside the object.
     */
    void zoomInOnTarget()
    {
        if ( selected != null && selected.IsActive && orbitTarget != selected) {
            orbitTarget.deselect();
            orbitTarget = selected;
            orbitTarget.select();

            LerpToTarget();
        }
    }
Example #5
0
 void Start()
 {
     objectHighlightOnMouseover tmp = GameObject.Find("startingPlanet").GetComponent<objectHighlightOnMouseover>();
     orbitTarget = tmp;
     originPlanet = tmp;
     canRotateCamera = true;
     LerpToTarget();
 }