Exemplo n.º 1
0
        public void Cmd_Cd(Command.Exec e)
        {
            Arguments args = e.GetArgs();

            //Debug.Log(args);
            args.TryGet("/", out string dir);
            args.TryGet("..", out bool backDir);
            if ((dir == ".." || backDir) && workingTransform != null)
            {
                workingTransform = workingTransform.parent;
                //Show.Log("backing up");
                return;
            }
            List <KeyValuePair <string, object> > list = Listing(workingTransform);

            for (int i = 0; i < list.Count; ++i)
            {
                //Show.Log(list[i].Key+","+dir);
                if (list[i].Key == dir)
                {
                    workingTransform = list[i].Value as Transform;
                    //Show.Log("found " + dir + ", heading into " + list[i].Value.GetType());
                    //Show.Log(workingTransform);
                    return;
                }
            }
        }
        public void Cmd_Pause(Command.Exec e)
        {
            Arguments args = e.GetArgs();

            if (args.TryGet("0", out bool unpause))
            {
                GameClock.Instance().Unpause();
            }
            else
            {
                GameClock.Instance().Pause();
            }
        }