Esempio n. 1
0
    //コマンド詳細表示
    public static void CommandStatus(bool vis, int _type, int _var)
    {
        comStatus = vis;
        if (vis)
        {
            nameComponent.text = ReadWrite.CallCommandName(_type, _var);
            string str = "";
            int[]  eff;
            str += "                              [" + commandType[_type] + "]" + newLine;
            switch (_type)
            {
            case (int)TurnAndPhase.Type.Attack:
                eff  = ReadWrite.CallCommandEffect(_type, _var);
                str += commandText[0] + ": " + eff[0] + newLine;
                str += commandText[1] + ": " + eff[1] + newLine;
                break;

            case (int)TurnAndPhase.Type.Move:
                eff  = ReadWrite.CallCommandEffect(_type, _var);
                str += commandText[1] + ": " + eff[0] + newLine;
                break;

            case (int)TurnAndPhase.Type.Buff:
                eff  = ReadWrite.CallCommandEffect(_type, _var);
                str += commandText[2] + ": " + statusText[eff[0]] + newLine;
                str += commandText[0] + ": " + eff[1] + newLine;
                str += commandText[3] + ": ";
                if (eff[2] > 0)
                {
                    str += eff[2] + "T";
                }
                else
                {
                    str += "永続";
                }
                str += newLine;
                break;

            case (int)TurnAndPhase.Type.Debuff:
                eff  = ReadWrite.CallCommandEffect(_type, _var);
                str += commandText[2] + ": " + statusText[eff[0]] + "\n";
                str += commandText[0] + ": " + -eff[1] + newLine;
                str += commandText[1] + ": " + eff[2] + newLine;
                break;
            }
            str += "\n";
            str += ReadWrite.CallCommandText(_type, _var);
            textComponent.text = str;
        }
        VisibleStatus(vis);
    }
Esempio n. 2
0
    //ターンごとにコマンドを増やすよ
    public static void AddCommand(int _type, int _var)
    {
        GameObject obj = (GameObject)Instantiate(command, new Vector3(0, 0, 0), Quaternion.identity);

        obj.transform.SetParent(hand.transform, false);
        obj.transform.localScale = new Vector3(1, 1, 1);
        obj.transform.FindChild("Text").gameObject.GetComponent <Text>().text = ReadWrite.CallCommandName(_type, _var);
        obj.transform.GetComponent <Command>().SetNum(commandNum, _type, _var);
        if (_type == (int)TurnAndPhase.Type.TurnEnd)
        {
            obj.transform.SetSiblingIndex(0);
        }
        commandList.Add(obj);
        commandNum++;
        handMax++;
    }