public WorldSpeechItem(SpeechBubble b, ITalkable t, Vector2 o)
 {
     bubble  = b;
     target  = t;
     offset  = o;
     Enabled = false;
 }
Example #2
0
        public SpeechItem(string s, ITalkable src, Vector2 offs, int w = 400, int d = 300)
        {
            Vector2 loc = src.GetScreenPosition();

            bubble = new SpeechBubble(s, (int)loc.X, (int)loc.Y, w, d);
            offset = offs;
            source = src;
        }
Example #3
0
 private void OnTriggerEnter(Collider other)
 {
     talk = other.GetComponent <ITalkable>();
     if (talk != null)
     {
         Cursor.visible   = true;
         Cursor.lockState = CursorLockMode.None;
         talk.SetTalk();
     }
 }
Example #4
0
 void Update()
 {
     if (inDialogue)
     {
         return;
     }
     if (Input.GetKeyDown(KeyCode.E))
     {
         Pos p = new Pos(entity.CurrentPosition, playerManager.LastDirectionFaced);
         //We get the entity that it's closest to us and check if it implements ITalkable.
         currentTalker = World.GetEntityAt(p) as ITalkable;
         if (currentTalker != null)
         {
             StartConversation();
         }
     }
 }
Example #5
0
        public void DrawSpike(SpriteBatch sb, ITalkable target, int side)
        {
            int     size = 20;
            Vector2 dest = target.GetScreenPosition() + new Vector2(30, 30);

            if (side >= 0)
            {
                for (int i = 1; i < size; i++)
                {
                    GuiHelpers.DrawLine(sb, new Vector2(xPos + corner.Width + i, yPos + height), dest, 1, intColor);
                }
                GuiHelpers.DrawLine(sb, new Vector2(xPos + corner.Width, yPos + height), dest, 2, border);
                GuiHelpers.DrawLine(sb, new Vector2(xPos + corner.Width + size, yPos + height), dest, 2, border);
            }
            else
            {
                for (int i = 1; i < size; i++)
                {
                    GuiHelpers.DrawLine(sb, new Vector2(xPos + width - (corner.Width + i), yPos + height), dest, 1, intColor);
                }
                GuiHelpers.DrawLine(sb, new Vector2(xPos + width - corner.Width, yPos + height), dest, 2, border);
                GuiHelpers.DrawLine(sb, new Vector2(xPos + width - (corner.Width + size), yPos + height), dest, 2, border);
            }
        }
Example #6
0
 public static void printOut(ITalkable p)
 {
     Console.WriteLine(p.getName() + " says=" + p.talk());
     outFile.fileWrite(p.getName() + " | " + p.talk());
 }
Example #7
0
        public SelectionSpeechItem(string s, ITalkable src, Vector2 o, int w, params SpeechOption[] options) : base(s, src, o, w, 99999999)
        {
            Vector2 loc = src.GetScreenPosition();

            bubble = new InteractableSpeechBubble(s, (int)loc.X, (int)loc.Y, w, 99999999, options);
        }
Example #8
0
 public CancellableSpeechItem(string s, ITalkable src, Vector2 o, int w = 400, int d = 300) : base(s, src, o, w, d)
 {
     duration = bubble.GetInitDuration();
 }
Example #9
0
 public DialogTrigger(ITalkable owner, string conversationName)
 {
     _conversationName = conversationName;
     _owner = owner;
 }
Example #10
0
 public SpeechItem(SpeechBubble b, ITalkable src, Vector2 o)
 {
     bubble = b;
     source = src;
     offset = o;
 }
Example #11
0
 public SpeechInteraction(ITalkable src, params WorldSpeechItem[] i)
 {
     talker  = src;
     items   = i.ToList();
     Enabled = false;
 }
Example #12
0
 public SpeechInteraction(ITalkable src, List <WorldSpeechItem> i)
 {
     talker  = src;
     items   = i;
     Enabled = false;
 }
Example #13
0
 public static void PrintOut(ITalkable p)
 {
     Console.WriteLine($"{p.Name} says = {p.Talk()}");
 }
Example #14
0
 public static void Printout(ITalkable p)
 {
     Console.WriteLine($"{p.GetName()} says= {p.Talk()}");
     outFile.FileWrite($"{p.GetName()} | {p.Talk()}");
 }
Example #15
0
 public ITalkable Whisper(ITalkable Recipient, string Message)
 {
     throw new NotImplementedException();
     return this;
 }
Example #16
0
 public Chef(string name)
 {
     this.ChefName     = name;
     this.speachLogger = new Speach();
 }
 public ShopInteraction(ITalkable src, params Item[] i)
 {
     source = src;
     items  = i;
 }
Example #18
0
 public ITalkable Whisper(ITalkable recipient, string message)
 {
     throw new NotImplementedException();
     return(this);
 }