Beispiel #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();
    }
Beispiel #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;
    }
    // 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();
    }
Beispiel #4
0
    public void Awake()
    {
        // for saving data
        GameObject player = GameObject.Find("Player");

        sp = player.GetComponent <SP_TwoTower>();
        pc = player.GetComponent <PC_TwoTower>();
    }
Beispiel #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());
    }
Beispiel #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);
    }
Beispiel #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");
    }
    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);
    }
Beispiel #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");
    }
Beispiel #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;
        }
    }
Beispiel #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;
    }
 private void Awake()
 {
     player = GameObject.Find("Player");
     sp     = player.GetComponent <SP_TwoTower>();
     pc     = player.GetComponent <PC_TwoTower>();
 }