Esempio n. 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (!other.gameObject.CompareTag("Player"))
     {
         return;
     }
     Debug.Log("Player collided with " + gameObject.name);
     Debug.Log("I am sending a string containing: " + axisToFollow.ToString());
     camMovement.setAxisToFollow(axisToFollow.ToString());
     camMovement.setCurrentCamTriggerBox(transform);
 }
Esempio n. 2
0
    public void RotateObject()
    {
        currentLocation += oneDegree / speedModifier;
        if (currentLocation > 2 * Math.PI)
        {
            currentLocation = 0;
        }
        float x = (float)(radius * Math.Cos(currentLocation));
        float y = (float)(radius * Math.Sin(currentLocation));

        switch (rotationAxis.ToString())
        {
        case "xAxis":
            this.transform.localPosition = new Vector3(0, x, y);
            break;

        case "yAxis":
            this.transform.localPosition = new Vector3(x, 0, y);
            break;

        case "zAxis":
            this.transform.localPosition = new Vector3(x, y, 0);
            break;
        }
    }
Esempio n. 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            axis a = axis.DU;

            if (radioButton1.Checked)
            {
                a = axis.LR;
            }
            if (radioButton2.Checked)
            {
                a = axis.DU;
            }
            if (radioButton3.Checked)
            {
                a = axis.FB;
            }
            string sound = Path.GetFileNameWithoutExtension(textBox6.Text);
            string sofa  = Path.GetFileNameWithoutExtension(textBox5.Text);

            textBox4.Text = string.Format("{0}_{1}_{2}_{3}_{4}", textBox1.Text, textBox2.Text, a.ToString(), sound, sofa);
        }