Beispiel #1
0
        public SOAL04()
        {
            Console.WriteLine("Masukkan deret 2 dim:");
            string[] split1 = Console.ReadLine().Split(',');
            int      jmlBrs = split1.Length;
            int      jmlKol = 0;

            foreach (var item in split1)
            {
                string[] split2 = item.Split(' ');
                jmlKol = split2.Length;
                break;
            }
            Array2D = new string[jmlBrs, jmlKol];

            int brs = 0;

            foreach (var item1 in split1)
            {
                int      kol    = 0;
                string[] split2 = item1.Split(' ');
                foreach (var item2 in split2)
                {
                    Array2D[brs, kol] = item2;
                    kol++;
                }
                brs++;
            }

            LogicFunction.PrintArray(Array2D);
        }
Beispiel #2
0
    public static bool Get(LogicFunction key)
    {
        if (!InputEnable())
        {
            return(false);
        }

        /* Tst Code
         *      if (key == LogicFunction.Item_CancelDrag ) {
         *          if(Input.GetKeyDown(KeyCode.Mouse1)){
         *              int aaa = 0;
         *          } else if(Input.GetKeyUp(KeyCode.Mouse1)){
         *              int aaa = 0;
         *          }
         *      }
         */
        LogicInput conf = s_logicInputConf[(int)key];

        while (conf != null)
        {
            if (CheckLogicInput(conf))
            {
                return(true);
            }
            conf = conf.Alternate;
        }
        return(false);
    }
Beispiel #3
0
 public LOGIC02(int n)
 {
     Array2D = new string[2, n];
     FillArray7();
     LogicFunction.PrintArray(Array2D);
     //Console.Write("Press any key to continue");
     //Console.ReadKey();
 }
Beispiel #4
0
 public SOAL06(string kalimat)
 {
     Array1D = new string[kalimat.Length];
     FillArray(kalimat);
     LogicFunction.PrintArray(Array1D);
     Console.WriteLine("\n");
     CountUpper();
 }
Beispiel #5
0
    /// <summary>
    /// lz-2016.09.19 通过逻辑功能键获得当前设置的按键
    /// </summary>
    /// <param name="funKey">逻辑功能键</param>
    /// <returns></returns>
    public static KeyCode GetKeyCodeByLogicFunKey(LogicFunction funKey)
    {
        int index = (int)funKey;

        if (index < 0 || index >= s_logicInputConf.Count)
        {
            return(KeyCode.None);
        }

        LogicInput input = s_logicInputConf[index];

        if (null == input || null == input.KeyJoy)
        {
            return(KeyCode.None);
        }
        return(input.KeyJoy._key);
    }