コード例 #1
0
        public void LoadFromString_WithVariousContent_ValueContentShouldMatchInput(string input, int codePage, string content)
        {
            var option = new ResponseOption();

            option.LoadFromString(input);

            Encoding encoding = Encoding.GetEncoding(codePage);

            option.Value.ContentBytes
            .ShouldBe(encoding.GetBytes(content));
        }
コード例 #2
0
        public void LoadFromString_WithDifferentEncodings_ValueEncodingShouldMatchInput(string input, int codePage)
        {
            var option = new ResponseOption();

            option.LoadFromString(input);

            Encoding encoding = Encoding.GetEncoding(codePage);

            option.Value.ContentEncoding
            .ShouldBe(encoding);
        }
コード例 #3
0
    void Update()
    {
        myDevice = SteamVR_Controller.Input(SteamVR_Controller.GetDeviceIndex(SteamVR_Controller.DeviceRelation.Rightmost));

        ResponseOption responseOption = GetOptionCurrentlyDepressedBack();

        if (Time.time > lastChangedMessageTime)
        {
            if (!displayedMessage)
            {
                textMessages.text = currentTextMessage.FormattedMessage();
                //textBubble.SetActive (true);
                mySource.Play();
                Debug.Log("Ran this");
                vibrateUntilTime = Time.time + vibrateForThisTimeInterval;
                displayedMessage = true;
            }

            if (vibrateUntilTime > Time.time)
            {
                VibrateController();
            }

            switch (responseOption)
            {
            case ResponseOption.OptionA:
                currentTextMessage = currentTextMessage.optionAReply;
                BlankTextBank(currentTextMessage.delay);
                break;

            case ResponseOption.OptionB:
                currentTextMessage = currentTextMessage.optionBReply;
                BlankTextBank(currentTextMessage.delay);
                break;

            case ResponseOption.OptionC:
                currentTextMessage = currentTextMessage.optionCReply;
                BlankTextBank(currentTextMessage.delay);
                break;

            case ResponseOption.OptionD:
                currentTextMessage = currentTextMessage.optionDReply;
                BlankTextBank(currentTextMessage.delay);
                break;
            }
        }
    }
コード例 #4
0
 public ResponseOption UpdateResponseOption(ResponseOption option)
 {
     updatedResponse = option;
     return(updatedResponse);
 }
コード例 #5
0
 public ResponseOptionViewModel(ResponseOption responseOption, bool selected)
 {
     ResponseOption = responseOption;
     Selected       = selected;
 }
コード例 #6
0
 public ResponseOptionViewModel(ResponseOption responseOption)
 {
     ResponseOption = responseOption;
     Selected       = false;
 }
コード例 #7
0
 public ResponseOptionViewModel()
 {
     ResponseOption = new ResponseOption();
     Selected       = false;
 }
コード例 #8
0
ファイル: OasisAssert.cs プロジェクト: haboustak/XdsKit
 public static void ResponseOption(ResponseOption option, ReturnType returnType, bool returnComposedObjects)
 {
     Assert.AreEqual(returnType, option.ReturnType);
     Assert.AreEqual(returnComposedObjects, option.ReturnComposedObjects);
 }