Exemplo n.º 1
0
    public void Awake()
    {
        GameObject player = GameObject.Find("Player");

        sp     = player.GetComponent <SP_TwoTower>();
        rotary = player.GetComponent <RR_TwoTower>();
        dl     = player.GetComponent <DL_TwoTower>();
        Debug.Log(sp.sceneName);
        if (sp.sceneName == "TwoTower_foraging")
        {
            reward = GameObject.Find("Reward");
        }
        else
        {
            reward0 = GameObject.Find("Reward0");
            reward1 = GameObject.Find("Reward1");
        }



        panoCam = GameObject.Find("panoCamera");
        panoCam.transform.eulerAngles = new Vector3(0.0f, -90.0f, 0.0f);
        initialPosition = new Vector3(0f, 6f, -50.0f);


        towerJitter  = .2f * (UnityEngine.Random.value - .5f);
        wallJitter   = .2f * (UnityEngine.Random.value - .5f);
        bckgndJitter = .2f * (UnityEngine.Random.value - .5f);

        LickHistory = new ArrayList();
    }
Exemplo n.º 2
0
    private void Awake()
    {
        player = GameObject.Find("Player");
        sp     = player.GetComponent <SP_TwoTower>();
        pc     = player.GetComponent <PC_TwoTower>();

        Pr_vec = new float[]
        {
            .0061f, .0068f, .0074f, .0081f, .0089f, .0097f, .0105f, .0114f, 0.0124f, .0133f, .0143f,
            .0154f, .0165f, .0176f, .0188f, .020f, .0212f, .0224f, .0237f, .0249f, .0261f, .0274f,
            .0286f, .0298f, .031f, .0321f, .0332f, .0343f, .0353f, .0362f, .0371f, .0379f, .0386f,
            .0392f, .0398f, .0402f, .0406f, .0409f, .0410f, .0411f
        };

        P_corrector_vec = new float[]
        {
            .0217f, .0219f, .0222f, .0224f, .0226f, .0228f, .0230f, .0232f, .0234f, .0236f, .0238f, .0240f,
            .0242f, .0244f, .0246f, .0247f, .0249f, .0251f, .0252f, .0253f, .255f, .0256f, .0257f, .0259f,
            .0260f, .0261f, .0262f, .0263f, .0263f, .0264f, .0265f, .0266f, .0266f, .0267f, .0267f, .0267f,
            .0268f, .0268f, .0268f, .0268f
        };

        trialHistory = new ArrayList();
        for (int i = 0; i < 40; i++)
        {
            trialHistory.Add(.5f);
        }
        ;
        sp.numTrialsTotal = numBaselineTrials + numTrainingTrials + numTestTrials;
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        GameObject player = GameObject.Find("Player");

        sp = player.GetComponent <SP_TwoTower>();
        pc = player.GetComponent <PC_TwoTower>();


        texture   = new Texture2D(1, 1);
        renderers = GetComponentsInChildren <Renderer>();


        foreach (var r in renderers)
        {
            // Do something with the renderer here...
            r.material.mainTexture = texture; // like disable it for example.
        }

        // jitter = .2f * (UnityEngine.Random.value - .5f);

        if (!sp.BlockWalls)
        {
            float tmp_morph = pc.towerJitter + sp.morph;
            color = Color.Lerp(Color.green, Color.blue, tmp_morph);
        }
        else
        {
            color = Color.Lerp(Color.green, Color.blue, .5f);
        }
        texture.SetPixel(1, 1, color);
        texture.filterMode = FilterMode.Point;
        texture.Apply();
    }
Exemplo n.º 4
0
    public void Awake()
    {
        // for saving data
        GameObject player = GameObject.Find("Player");

        sp = player.GetComponent <SP_TwoTower>();
        pc = player.GetComponent <PC_TwoTower>();
    }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        player = GameObject.Find("Player");
        sp     = player.GetComponent <SP_TwoTower>();
        pc     = player.GetComponent <PC_TwoTower>();


        reward = GameObject.Find("Reward");
    }
    // Use this for initialization
    void Start()
    {
        player = GameObject.Find("Player");
        sp     = player.GetComponent <SP_TwoTower>();
        rr     = player.GetComponent <RR_TwoTower>();

        nPixels = dim1 * dim2;

        StartCoroutine(DrawRandBlocks());
    }
Exemplo n.º 7
0
    void Start()
    {
        // for saving data
        GameObject player = GameObject.Find("Player");

        sp    = player.GetComponent <SP_TwoTower>();
        pc    = player.GetComponent <PC_TwoTower>();
        notes = player.GetComponent <Notes>();
        Debug.Log(sp.numTraversals);
    }
Exemplo n.º 8
0
    // Use this for initialization
    void Start()
    {
        player = GameObject.Find("Player");
        sp     = player.GetComponent <SP_TwoTower>();
        rr     = player.GetComponent <RR_TwoTower>();
        to     = player.GetComponent <DebiasingAlg_TwoTower>();

        SineWalls  = GameObject.Find("SineWalls");
        BlockWalls = GameObject.Find("BlockWalls");
    }
Exemplo n.º 9
0
    void Awake()
    {
        player = GameObject.Find("Player");
        sp     = player.GetComponent <SP_TwoTower>();
        pc     = player.GetComponent <PC_TwoTower>();
        //to = player.GetComponent<DebiasingAlg_TwoTower>();
        to = player.GetComponent <TrialOrdering_TwoTower>();

        baseline_half  = (int)to.numBaselineTrials / 2;
        baseline_quart = (int)Mathf.Min(to.numBaselineTrials / 4, 10f);
    }
Exemplo n.º 10
0
    public void Awake()
    {
        // set speed
        speedBool = 0;

        // connect to playerController script
        GameObject player = GameObject.Find("Player");

        pc = player.GetComponent <PC_TwoTower>();
        sp = player.GetComponent <SP_TwoTower>();
    }
    // Use this for initialization
    void Start()
    {
        player = GameObject.Find("Player");
        sp     = player.GetComponent <SP_TwoTower>();
        //blackCam = GameObject.Find("Black Camera");
        rr = player.GetComponent <RR_TwoTower>();
        to = player.GetComponent <DebiasingAlg_TwoTower_4Way>();

        reward0  = GameObject.Find("Reward0");
        reward1  = GameObject.Find("Reward1");
        timeout0 = GameObject.Find("Timeout0");
        timeout1 = GameObject.Find("Timeout1");
    }
Exemplo n.º 12
0
    // Use this for initialization
    void Start()
    {
        player = GameObject.Find("Player");
        sp     = player.GetComponent <SP_TwoTower>();
        pc     = player.GetComponent <PC_TwoTower>();



        cameras = GetComponentsInChildren <Camera>();
        foreach (var cam in cameras)
        {
            cam.clearFlags = CameraClearFlags.SolidColor;
        }
    }
Exemplo n.º 13
0
    //  public float jitter;

    // Use this for initialization
    void Start()
    {
        player = GameObject.Find("Player");
        sp     = player.GetComponent <SP_TwoTower>();
        pc     = player.GetComponent <PC_TwoTower>();
        //blackCam = GameObject.Find("Black Camera");
        rr = player.GetComponent <RR_TwoTower>();
//       trialOrder = player.GetComponent<TrialOrdering_Test>();

        eWall        = GameObject.Find("East Wall");
        eastRenderer = eWall.GetComponent <Renderer>();
        wWall        = GameObject.Find("West Wall");
        westRenderer = wWall.GetComponent <Renderer>();



        morph = sp.morph;
    }
Exemplo n.º 14
0
 private void Awake()
 {
     player = GameObject.Find("Player");
     sp     = player.GetComponent <SP_TwoTower>();
     pc     = player.GetComponent <PC_TwoTower>();
 }