Exemplo n.º 1
0
    private void setupMode()
    {
        switch (currentMode)
        {
        case MagicMode.TheForce:
            switchToForceMode();
            previousMode = currentMode;
            break;

        case MagicMode.MagicBall:
            switchToMagicBallMode();
            previousMode = currentMode;
            break;

        case MagicMode.MagicBow:
            switchToMagicBowMode();
            previousMode = currentMode;
            break;

        case MagicMode.BigMagic:
            switchToBigMagicMode();
            previousMode = currentMode;
            break;
        }
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        var device = SteamVR_Controller.Input((int)rightControllerTrackedObj.index);

        if (device.GetPressDown(SteamVR_Controller.ButtonMask.Touchpad))
        {
            if (device.GetAxis().x > 0 && device.GetAxis().y > 0)
            {
                currentMode = MagicMode.TheForce;
            }
            if (device.GetAxis().x < 0 && device.GetAxis().y > 0)
            {
                currentMode = MagicMode.MagicBall;
            }
            if (device.GetAxis().x < 0 && device.GetAxis().y < 0)
            {
                currentMode = MagicMode.MagicBow;
            }
            if (device.GetAxis().x > 0 && device.GetAxis().y < 0)
            {
                currentMode = MagicMode.BigMagic;
            }
        }

        if (currentMode != previousMode)
        {
            setupMode();
        }
    }
Exemplo n.º 3
0
 public void SetProperties(MagicMode mode, object properties)
 {
     switch (mode)
     {
         case MagicMode.File:
             this.SetFile((FileProperties)properties);
             break;
         case MagicMode.JPG:
             this.SetJPG((JPGExif)properties);
             break;
         case MagicMode.MP3:
             this.SetMP3((MP3Tag)properties);
             break;
         default:
             this.SetNone();
             break;
     }
 }
Exemplo n.º 4
0
        public void SetProperties(MagicMode mode, object properties)
        {
            switch (mode)
            {
            case MagicMode.File:
                this.SetFile((FileProperties)properties);
                break;

            case MagicMode.JPG:
                this.SetJPG((JPGExif)properties);
                break;

            case MagicMode.MP3:
                this.SetMP3((MP3Tag)properties);
                break;

            default:
                this.SetNone();
                break;
            }
        }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     currentMode = MagicMode.TheForce;
     setupMode();
 }