예제 #1
0
    public override void Update()
    {
        mFlatCamera.update(Time.deltaTime);
        foreach (FlatElementBase e in mElement)
        {
            e.update(Time.deltaTime);
        }
        TED.update(Time.deltaTime);

        ModeNormalPlay.draw_render_texture(mRTCamera);


        if (!GameConstants.XB1)
        {
            if (mManager.mZigManager.DepthView.DepthTexture != null)
            {
                mDepthImage.set_new_texture(mManager.mZigManager.DepthView.DepthTexture, new Vector2(160, 120));
            }
        }


        //TEST CODE FOR XB1 DEPTH/IMAGE DISPLAY CAN DELETE
        //mDepthImage.set_new_texture((mManager.mZigManager.ZgInterface as MicrosoftZig).mKinect.DepthTexture,new Vector2(160,120));
        //if(mManager.mZigManager.ImageView.imageTexture != null)
        //mColorImage.set_new_texture((mManager.mZigManager.ZgInterface as MicrosoftZig).mColorImageRT,new Vector2(300,300));

        /*Material mat2 = new Material(ManagerManager.Manager.mReferences.mXB1ClearShader);
         * mat2.SetTexture("_MainTex",(mManager.mZigManager.ZgInterface as MicrosoftZig).mKinect.LabelTexture);
         * mDepthImage.PrimaryGameObject.GetComponentInChildren<Renderer>().material = mat2;
         *
         * Material mat = new Material(ManagerManager.Manager.mReferences.mXB1KinectImageMaskingShader);
         * mat.SetTexture("_MainTex",(mManager.mZigManager.ZgInterface as MicrosoftZig).mKinect.ColorTexture);
         * mat.SetTexture("_AlphaTex",(mManager.mZigManager.ZgInterface as MicrosoftZig).mKinect.LabelTexture);
         * mColorImage.PrimaryGameObject.GetComponentInChildren<Renderer>().material = mat;*/
    }
예제 #2
0
 public void update()
 {
     foreach (FlatElementBase e in mElement)
     {
         e.update(Time.deltaTime);
     }
     TED.update(Time.deltaTime);
 }
예제 #3
0
 public void update()
 {
     mFlatCamera.update(Time.deltaTime);
     foreach (FlatElementBase e in mElement)
     {
         e.update(Time.deltaTime);
     }
     TED.update(Time.deltaTime);
     mUnlockAnnouncer.update();
 }
예제 #4
0
    public void update()
    {
        //cheater keys for skipping
        if (KeyMan.GetKeyDown("HardSkip"))
        {
            DoSkipMultipleThisFrame = true;
        }
        if (KeyMan.GetKeyDown("SoftSkip"))
        {
            DoSkipSingleThisFrame = true;
        }

        //TODO not sure why I put this here but this most most def. does not work
        //if(Input.GetKeyDown(KeyCode.Alpha8))
        //transition_to_TRANSITION_play(new CharacterIndex("999"));
        //mManager.mTransparentBodyManager.transition_character_in(GameConstants.UiWhiteTransparent);


        //handle cheater keys for choosing
        if (GS == NormalPlayGameState.CHOICE)
        {
            //cheater keys for difficulty
            if (
                NGM.CurrentCharacterIndex.LevelIndex < 7 &&
                (Input.GetKeyDown(KeyCode.Q) ||
                 Input.GetKeyDown(KeyCode.W) ||
                 Input.GetKeyDown(KeyCode.E) ||
                 Input.GetKeyDown(KeyCode.R)))
            {
                if (Input.GetKeyDown(KeyCode.Q))
                {
                    NGM.CharacterHelper.Characters[NGM.CurrentCharacterIndex.get_future_neighbor(0)].Difficulty += 1;
                }
                if (Input.GetKeyDown(KeyCode.W))
                {
                    NGM.CharacterHelper.Characters[NGM.CurrentCharacterIndex.get_future_neighbor(1)].Difficulty += 1;
                }
                if (Input.GetKeyDown(KeyCode.E))
                {
                    NGM.CharacterHelper.Characters[NGM.CurrentCharacterIndex.get_future_neighbor(2)].Difficulty += 1;
                }
                if (Input.GetKeyDown(KeyCode.R))
                {
                    NGM.CharacterHelper.Characters[NGM.CurrentCharacterIndex.get_future_neighbor(3)].Difficulty += 1;
                }
                for (int i = 0; i < 4; i++)
                {
                    NGM.CharacterHelper.Characters[NGM.CurrentCharacterIndex.get_future_neighbor(i)].Difficulty %= 4;
                }
                mChoosingManager.set_bb_choices(NGM.CurrentCharacterIndex.get_future_neighbor(0).get_neighbors());
            }

            //KeyCode[] levelKeys = new KeyCode[]{KeyCode.Q,KeyCode.W,KeyCode.E,KeyCode.R,KeyCode.T,KeyCode.Z,KeyCode.U,KeyCode.I};
            //KeyCode[] choiceKeys = new KeyCode[]{KeyCode.Alpha1,KeyCode.Alpha2,KeyCode.Alpha3,KeyCode.Alpha4};
            string[] levelKeys  = new string[] { "lvl1", "lvl2", "lvl3", "lvl4", "lvl5", "lvl6", "lvl7", "lvl8" };
            string[] choiceKeys = new string[] { "Choice1", "Choice2", "Choice3", "Choice4" };
            for (int i = 0; i < levelKeys.Length; i++)
            {
                if (KeyMan.GetKey(levelKeys[i]))
                {
                    for (int j = 0; j < choiceKeys.Length; j++)
                    {
                        if (KeyMan.GetKeyDown(choiceKeys[j]))
                        {
                            slide_image(mFlatCamera, mChoosingImage, null);
                            slide_image(mFlatCamera, mSunsetImage, null, false);
                            mManager.mMusicManager.fade_out_extra_music();
                            mManager.mMusicManager.fade_out(0);
                            mManager.mAssetLoader.new_load_character((new CharacterIndex(i + 1, j)).StringIdentifier, mManager.mCharacterBundleManager);
                        }
                    }
                }
            }
        }



        mInterfaceManager.Update();
        mSunsetManager.update();
        mChoosingManager.update();
        mGiftManager.update();

        //TODO only draw if necessary
        draw_render_texture(mSunsetManager.mFlatCamera);
        draw_render_texture(mChoosingManager.mFlatCamera);
        //draw_render_texture(mInterfaceManager.mFlatCamera);

        mFlatCamera.update(Time.deltaTime);
        foreach (FlatElementBase e in mElement)
        {
            e.update(Time.deltaTime);
        }


        if (GS == NormalPlayGameState.PLAY)
        {
            //if(Input.GetKeyDown(KeyCode.P))
            //	mParticles.create_particles(mGrading);
            update_PLAY();
            if (KeyMan.GetKeyDown("HardSkip"))
            {
                TimeRemaining = -5;                 //0;
            }
        }
        else if (GS == NormalPlayGameState.CHOICE)
        {
            update_CHOICE();
        }

        mParticles.update(Time.deltaTime);
        TED.update(Time.deltaTime);


        //hacks
        if (DoSkipMultipleThisFrame)
        {
            mInterfaceManager.skip_cutscene();

            mSunsetManager.skip_grave();

            //grave skipping lul
            DoSkipMultipleThisFrame = false;
        }

        if (DoSkipSingleThisFrame)
        {
            DoSkipSingleThisFrame = false;
        }
    }