Ejemplo n.º 1
0
    public void ActivateMenu()
    {
        Time.timeScale      = 0;
        AudioListener.pause = true;
        pauseMenu.SetActive(true);
        Cursor.lockState = CursorLockMode.None;
        MouseRaycast mr = Camera.main.GetComponent <MouseRaycast>();

        mr.enabled = false;
    }
Ejemplo n.º 2
0
    public void DeactivateMenu()
    {
        Time.timeScale      = 1;
        AudioListener.pause = false;
        pauseMenu.SetActive(false);
        Cursor.lockState = CursorLockMode.Locked;
        MouseRaycast mr = Camera.main.GetComponent <MouseRaycast>();

        mr.enabled = true;
        Paused     = !Paused;
    }
Ejemplo n.º 3
0
    //_______________________________________________________________________________________

    void Start()
    {
        GetSelfID();
        self_position         = this.transform.position;
        moveToPosition        = new Vector3(self_position.x, self_position.y, self_position.z);
        positionPrev          = moveToPosition;
        qbitsAll              = GameObject.FindGameObjectsWithTag("qbit");
        mouseRaycast          = GameObject.Find("mouseRaycast").GetComponent <MouseRaycast>();
        delaunayTriangulation = GameObject.Find("delaunayTriangulation");
        randomJitteryId       = GameObject.Find("randomJitteryId").GetComponent <RandomJitteryId>();
        non_eScale            = this.transform.localScale.x;
        self_rigidbody        = this.GetComponent <Rigidbody>();
        self_collider         = this.GetComponent <SphereCollider>();
        floorLength           = GameObject.Find("floor").GetComponent <Renderer>().bounds.size.x;
        floorCentroid         = GameObject.Find("floor").GetComponent <Renderer>().bounds.center;
    }
Ejemplo n.º 4
0
    void Start()
    {
        // with a spawned GO...
        // instantiate frame = the GO does nothing
        // frame 2 = Start(), not Update() yet
        // frame 3 = the first Update()
        floorWidth  = GameObject.Find("floor").GetComponent <Renderer>().bounds.size.x;
        floorHeight = GameObject.Find("floor").GetComponent <Renderer>().bounds.size.z;

        delaunayScript        = GameObject.Find("delaunayTriangulation").GetComponent <DelaunayTriangulation>();
        boundingQbits_allInfo = self_voidAllInfo.boundingQbits_allInfo;
        self_id = self_voidAllInfo.id;

        mouseRaycast_script = GameObject.Find("mouseRaycast").GetComponent <MouseRaycast>();

        trackingAreaThresh = delaunayScript.voidTrackingAreaThresh;
        xfadeAreaThresh    = delaunayScript.voidXfadeAreaThresh;

        // these interestingly have to be here in the Start() or the DelaunayTriangulation script
        // won't be able to check the centroid of this mesh until the 3rd frame after instantiation,
        // and you'd get two GOs spawned per void centroid
        meshCentroid = self_voidAllInfo.centroid;
        meshArea     = self_voidAllInfo.area;

        firstMeshFrame = true;

        oscOutScript = GameObject.Find("osc").GetComponent <OscOut>();
        oscInScript  = GameObject.Find("osc").GetComponent <OscIn>();
        oscInScript.MapInt("/void/" + (self_id + 1) + "/igniterEvent/click", OscIn_IgniterClick);
        oscInScript.MapInt("/void/" + (self_id + 1) + "/igniterEvent/end", OscIn_IgniterEnd);

        swarmParams_script = GameObject.Find("swarmParams").GetComponent <SwarmParams>();

        springJoint   = GetComponent <SpringJoint>();
        voidRigidbody = GetComponent <Rigidbody>();

        mixer = new Mixer();
        MixerValues_Init();
        localPosPrev = transform.position;
    }
Ejemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     script = this;
 }
Ejemplo n.º 6
0
 private void Start()
 {
     m_mouseRayCast = GameObject.Find("Player").GetComponent <MouseRaycast>();
     m_mouseRayCast.OnSecondaryPositionChange += SpawnNewObject;
     m_dnm = GameObject.Find("NavMesh").GetComponent <DynamicNavMesh>();
 }
Ejemplo n.º 7
0
 void OnEnable()
 {
     m_mraycast = GetComponent <MouseRaycast>();
     m_mraycast.OnPositionChange += ChangePosition;
 }
Ejemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     script = this;
 }