Example #1
0
    void FireMelody(KoreographyEvent koreoEvent)
    {
//		Debug.Log("BUMP "+Time.time);
        if (koreoEvent.GetFloatValue() != 0)
        {
            GameManager.instance.om.AddObstacle(Mathf.RoundToInt(koreoEvent.GetFloatValue()));
        }
        else
        {
            GameManager.instance.om.AddObstacle(koreoEvent.GetIntValue());
        }
        //	GameManager.instance.om.test();
    }
Example #2
0
 private void transformGameObject(KoreographyEvent evt)
 {
     laneNum = Mathf.Floor(evt.GetFloatValue() - 67f) % 4f;
     Debug.Log(laneNum);
     position = new Vector3(laneNum * 3.55f - 4.35f, 0f, 0f);
     rotation = Quaternion.Euler(Vector3.zero);
     Instantiate(cube, position, rotation, gameObject.transform);
 }
Example #3
0
        private void AddImpulse(KoreographyEvent evt)
        {
            // Add impulse by overriding the Vertical component of the Velocity.
            Vector3 vel = rigidbodyCom.velocity;

            vel.y = jumpSpeed;

            rigidbodyCom.velocity = vel;
            transform.position    = new Vector3(evt.GetFloatValue() * 0.1f, 0, 0);
        }