Exemple #1
0
    //ADV用SendMessageコマンドが実行されたタイミング
    void OnDoCommand(AdvCommandSendMessage command)
    {
        switch (command.Name)
        {
        case "3DOn":
            TreedOn(command);
            break;

        case "3DOff":
            TreedOff(command);
            break;

        case "RotateOn":
            RotateOn(command);
            break;

        case "RotateOff":
            RotateOff(command);
            break;

        case "Model":
            ModelOn(command);
            break;

        case "ModelOff":
            ModelOff(command);
            break;

        default:
            Debug.Log("Unknown Message:" + command.Name);
            break;
        }
    }
Exemple #2
0
 //回転ON
 void RotateOn(AdvCommandSendMessage command)
 {
     if (!float.TryParse(command.Arg2, out rotSpped))
     {
         rotSpped = 15;
     }
     //演出としてカメラを回す
     StartCoroutine("CoRotate3D");
 }
Exemple #3
0
 //ADV用SendMessageコマンドの処理待ちタイミング
 void OnWait(AdvCommandSendMessage command)
 {
     switch (command.Name)
     {
     default:
         command.IsWait = false;
         break;
     }
 }
Exemple #4
0
 //回転ON
 void RotateOn(AdvCommandSendMessage command)
 {
     if (!WrapperUnityVersion.TryParseFloatGlobal(command.Arg2, out rotSpped))
     {
         rotSpped = 15;
     }
     //演出としてカメラを回す
     StartCoroutine("CoRotate3D");
 }
Exemple #5
0
    //モデルの表示
    void ModelOff(AdvCommandSendMessage command)
    {
        GameObject model = FindModel(command.Arg2);

        if (model != null)
        {
            model.SetActive(false);
        }
    }
Exemple #6
0
    //SendMessageコマンドの処理待ちタイミング
    void OnAgingInput(AdvCommandSendMessage command)
    {
        switch (command.Name)
        {
        case "InputFileld":
            inputFiled.gameObject.SetActive(false);
            break;

        default:
            break;
        }
    }
Exemple #7
0
    //モデルの表示
    void ModelOn(AdvCommandSendMessage command)
    {
        GameObject model = FindModel(command.Arg2);

        if (model != null)
        {
            model.SetActive(true);
            if (!string.IsNullOrEmpty(command.Arg3))
            {
                model.animation.CrossFade(command.Arg3);
            }
        }
    }
Exemple #8
0
    //SendMessageコマンドの処理待ちタイミング
    void OnWait(AdvCommandSendMessage command)
    {
        switch (command.Name)
        {
        case "InputFileld":
            //インプットフィールドが有効な間は待機
            command.IsWait = inputFiled.gameObject.activeSelf;
            break;

        case "AutoLoad":
            command.IsWait = true;
            break;

        default:
            command.IsWait = false;
            break;
        }
    }
Exemple #9
0
    //SendMessageコマンドが実行されたタイミング
    void OnDoCommand(AdvCommandSendMessage command)
    {
        switch (command.Name)
        {
        case "DebugLog":
            DebugLog(command);
            break;

        case "InputFileld":
            InputFileld(command);
            break;

        case "AutoLoad":
            AutoLoad(command);
            break;

        default:
            Debug.Log("Unknown Message:" + command.Name);
            break;
        }
    }
Exemple #10
0
 //回転ON
 void RotateOff(AdvCommandSendMessage command)
 {
     StopCoroutine("CoRotate3D");
 }
Exemple #11
0
 //3D表示OFF
 void TreedOff(AdvCommandSendMessage command)
 {
     root3d.SetActive(false);
     StopAllCoroutines();
 }
Exemple #12
0
 //3D表示ON
 void TreedOn(AdvCommandSendMessage command)
 {
     root3d.SetActive(true);
 }
Exemple #13
0
 //設定された入力フィールドを有効化
 void InputFileld(AdvCommandSendMessage command)
 {
     inputFiled.gameObject.SetActive(true);
     inputFiled.onEndEdit.RemoveAllListeners();
     inputFiled.onEndEdit.AddListener((string text) => OnEndEditInputFiled(command.Arg2, text));
 }
Exemple #14
0
 //デバッグログを出力
 void DebugLog(AdvCommandSendMessage command)
 {
     Debug.Log(command.Arg2);
 }
Exemple #15
0
 //オートロード
 void AutoLoad(AdvCommandSendMessage command)
 {
     Debug.Log("AutoLoad");
     StartCoroutine(CoAutoLoadSub());
 }