示例#1
0
    void HandleDoorTile(Tile tile)
    {
        sim.AddEvent(PlayerEvent.Info("Found a door"));
        var prompt = string.Format("Leave the room or look again?");

        sim.AddEvent(PlayerEvent.PromptChoice(prompt,
                                              Choice.SwipeLeft("leave", "Leave"),
                                              Choice.SwipeRight("stay", "Stay")));
    }
示例#2
0
    void ExecuteBranch(string key)
    {
        var branch = sim.currentInteraction.GetBranch(key);

        sim.currentBranch = branch;

        var ev = PlayerEvent.PromptChoice(branch);

        sim.AddEvent(ev);
    }
示例#3
0
    void PromptMobChoices(Tile tile)
    {
        var mob    = MobStore.Find(tile.contentId);
        var prompt = string.Format("You notice [{0}] before it notices you...", mob.name);

        sim.AddEvent(PlayerEvent.PromptChoice(prompt,
                                              Choice.SwipeLeft("attack", "Attack"),
                                              Choice.SwipeRight("ignore", "Ignore")));
        sim.discoveredObjects.Add(mob.id);
    }
示例#4
0
    void HandleInteractibleTile(Tile tile)
    {
        sim.AddEvent(PlayerEvent.Info("Found interactible"));
        var interactible = InteractibleStore.Find(tile.contentId);
        var prompt       = string.Format("You see {0}", interactible.name);

        sim.AddEvent(PlayerEvent.PromptChoice(prompt,
                                              Choice.SwipeLeft("investigate", "Investigate"),
                                              Choice.SwipeRight("ignore", "Ignore")));
        sim.discoveredObjects.Add(interactible.id);
    }