public WorldSpeechItem(SpeechBubble b, ITalkable t, Vector2 o)
 {
     bubble  = b;
     target  = t;
     offset  = o;
     Enabled = false;
 }
Esempio n. 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;
        }
Esempio n. 3
0
 private void OnTriggerEnter(Collider other)
 {
     talk = other.GetComponent <ITalkable>();
     if (talk != null)
     {
         Cursor.visible   = true;
         Cursor.lockState = CursorLockMode.None;
         talk.SetTalk();
     }
 }
Esempio n. 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();
         }
     }
 }
Esempio n. 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);
            }
        }
Esempio n. 6
0
 public static void printOut(ITalkable p)
 {
     Console.WriteLine(p.getName() + " says=" + p.talk());
     outFile.fileWrite(p.getName() + " | " + p.talk());
 }
Esempio n. 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);
        }
Esempio n. 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();
 }
Esempio n. 9
0
 public DialogTrigger(ITalkable owner, string conversationName)
 {
     _conversationName = conversationName;
     _owner = owner;
 }
Esempio n. 10
0
 public SpeechItem(SpeechBubble b, ITalkable src, Vector2 o)
 {
     bubble = b;
     source = src;
     offset = o;
 }
Esempio n. 11
0
 public SpeechInteraction(ITalkable src, params WorldSpeechItem[] i)
 {
     talker  = src;
     items   = i.ToList();
     Enabled = false;
 }
Esempio n. 12
0
 public SpeechInteraction(ITalkable src, List <WorldSpeechItem> i)
 {
     talker  = src;
     items   = i;
     Enabled = false;
 }
Esempio n. 13
0
 public static void PrintOut(ITalkable p)
 {
     Console.WriteLine($"{p.Name} says = {p.Talk()}");
 }
Esempio n. 14
0
 public static void Printout(ITalkable p)
 {
     Console.WriteLine($"{p.GetName()} says= {p.Talk()}");
     outFile.FileWrite($"{p.GetName()} | {p.Talk()}");
 }
Esempio n. 15
0
 public ITalkable Whisper(ITalkable Recipient, string Message)
 {
     throw new NotImplementedException();
     return this;
 }
Esempio n. 16
0
 public Chef(string name)
 {
     this.ChefName     = name;
     this.speachLogger = new Speach();
 }
Esempio n. 17
0
 public ShopInteraction(ITalkable src, params Item[] i)
 {
     source = src;
     items  = i;
 }
Esempio n. 18
0
 public ITalkable Whisper(ITalkable recipient, string message)
 {
     throw new NotImplementedException();
     return(this);
 }