Example #1
0
 /** `Quit` : **`Parse`**
  *
  * Prompts user through `Terminal` to quit the game.
  **/
 public static bool Quit(
                 adv::Person sender,
                 EventArgs e,
                 Command c,
                 string input) {
     Terminal.Alert(Pathways.messages["quit"]);
     return true;
 }
Example #2
0
 /** `Load` : **`Parse`**
  *
  * Loads a game from a `*.yml` file. Currently broken.
  **/
 public static bool Load(
                 adv::Person sender,
                 EventArgs e,
                 Command c,
                 string input) {
     Terminal.Clear();
     Terminal.LogImmediate(
         "I/O Disabled, restarting level.");
     SceneManager.LoadScene(0);
     return true;
 }
 public bool Kill(
                 adv::Person sender,
                 EventArgs e,
                 lit::Command c,
                 string input) => Kill();
Example #4
0
 public void OnMove(adv::Person sender, EventArgs e) {  }
Example #5
0
 public static void Display(intf::Message m)
 {
     message_title.text = m.uuid;
     message_body.text = m.desc;
     Pathways.gameState = GameStates.Msgs;
 }
Example #6
0
 /** `Save` : **`Parse`**
  *
  * Saves a game from a `*.yml` file. Currently broken.
  **/
 public static bool Save(
                 adv::Person sender,
                 EventArgs e,
                 Command c,
                 string input) {
     if (File.Exists(input))
         Terminal.Alert("Overwriting file...");
     using (StreamWriter file = new StreamWriter(input)) {
         file.WriteLine("%YAML 1.1");
         file.WriteLine($"---  # Saved Game\n");
         file.WriteLine("player:");
         var pos = new Vector3(0f,0f,0f);
         //    Player.Position.x,
         //    Player.Position.y,
         //    Player.Position.z);
         file.WriteLine($"  position: {pos}");
         //file.WriteLine($"  area: {Player.area}");
         //file.WriteLine($"  room: {Player.Room}");
         file.WriteLine("  items:\n");
         //foreach (var elem in Player.Items)
         //    file.WriteLine($"  - {elem.Name}");
         file.WriteLine("\n...\n");
     } return true;
 } /*(s) => (s.Length>100)?(s.Substring(0,100)+"…"):(s); */
Example #7
0
 /** `Redo` : **`Parse`**
  *
  * Runs the prior command issued to the `Parser` again.
  **/
 public static bool Redo(
                 adv::Person sender,
                 EventArgs e,
                 Command c,
                 string input) => true;
Example #8
0
 public static bool Hide(
                 adv::Person sender,
                 EventArgs e,
                 Command c,
                 string input) => false;
Example #9
0
 public static bool Pull(
                 adv::Person sender,
                 EventArgs e,
                 Command c,
                 string input) =>
     Player.Current.Pull(Player.Current,e,c,input);
Example #10
0
        } /*(s) => (s.Length>100)?(s.Substring(0,100)+"…"):(s); */


        /** `Help` : **`Parse`**
         *
         * Shows the help menu via `Window`.
         **/
        public static bool Help(
                        adv::Person sender,
                        EventArgs e,
                        Command c,
                        string input) {
            Window.Display(Pathways.messages["help"]);
            return true;
        }