public MessageAlarm(IntentEnum intent, double confidence, DateTime time, double timeConfidence, int days, string message) : this(intent, confidence) { Time = time; TimeConfidence = timeConfidence; DaysEnabled = days; Note = message; }
public MessageWeather(IntentEnum intent, double confidence, string location, double locationConfidence, DateTime when, double whenConfidence) : this(intent, confidence) { Location = location; LocationConfidence = locationConfidence; When = when; WhenConfidence = whenConfidence; }
/// <summary> /// Initializes a new instance of the <see cref="IntentAction"/> class /// </summary> /// <param name="intent">Target intent</param> /// <param name="issingPlayerId">The player who issued this intent</param> /// <param name="card">the card involved, null if creature combat</param> /// <param name="sourceId">the attacking creature, if applicable</param> /// <param name="targetId">the receiver, either creature Id or player Id if applicable</param> public IntentAction(IntentEnum intent, int issingPlayerId, Card card, int sourceId, int targetId) { this.Intent = intent; this.IssuingPlayerId = issingPlayerId; this.Card = card; this.SourceId = sourceId; this.TargetId = targetId; }
public Message(IntentEnum intent, double confidence) { MessageIntent = intent; Confidence = confidence; Created = DateTime.Now; RawMessage = ""; Note = ""; }
/// <summary> /// 从JObject对象解析 /// </summary> /// <param name="jo"></param> public virtual void Parse(JObject jo) { intent = (IntentEnum)Enum.Parse(typeof(IntentEnum), (string)jo["intent"]); JObject joDetails = (JObject)jo["details"]; JToken jt; action = joDetails.TryGetValue("action", out jt) ? (string)jt : null; answer = joDetails.TryGetValue("answer", out jt) ? (string)jt : null; dialog = joDetails.TryGetValue("dialog", out jt) ? (string)jt : null; }
/// <summary> /// Adds a new intent /// </summary> /// <param name="intent">Target intent</param> /// <param name="issuingPlayerId">The player who issued this intent</param> /// <param name="card">the card involved, null if creature combat</param> /// <param name="sourceId">the attacking creature, if applicable</param> /// <param name="targetId">the receiver, either creature Id or player Id if applicable</param> public void AddIntent(IntentEnum intent, int issuingPlayerId, Card card, int sourceId, int targetId) { // If current intent is pass, check last action to see if it was also pass. If so, resolve if (intent == IntentEnum.PassTurn && this.ActionStack.Count > 0 && this.ActionStack.Peek().Intent == IntentEnum.PassTurn) { this.ResolvePendingActions(); } else { var newIntent = new IntentAction(intent, issuingPlayerId, card, sourceId, targetId); this.ActionStack.Push(newIntent); } // Renders all components TurnManager.CurrentInstance.Render(); this.LastPlayedIntentCardComponent.Render(); this.Render(); }
public void MoveObject() { intent = IntentEnum.Move; Debug.Log($"Set intent to {intent}"); SpeechManager.Instance.Speech($"Set intent to {intent}"); }
public void ChangeColor() { intent = IntentEnum.ChangeColor; Debug.Log($"Set intent to {intent}"); SpeechManager.Instance.Speech($"Set intent to {intent}"); }
/// <summary> /// Commits a normal card use on a creature or health card /// </summary> /// <param name="intent">Target intent</param> /// <param name="issuingPlayerId">The player who issued this intent</param> /// <param name="card">the card involved, null if creature combat</param> /// <param name="sourceId">the attacking creature, if applicable</param> /// <param name="targetId">the receiver, either creature Id or player Id if applicable</param> public void CommitCardUse(IntentEnum intent, int issuingPlayerId, Card card, int sourceId, int targetId) { IntentManager.CurrentInstance.AddIntent(intent, issuingPlayerId, card, sourceId, targetId); TurnManager.CurrentInstance.Render(); }
public void RpcCommitCardUse(IntentEnum intent, int issuingPlayerId, Card card, int sourceId, int targetId) { this.CommitCardUse(intent, issuingPlayerId, card, sourceId, targetId); }
public static PdfName Name( this IntentEnum intent ) { return(codes[intent]); }
public MessageNote(IntentEnum intent, double confidence) : base(intent, confidence) { }
public MessageAlarm(IntentEnum intent, double confidence, DateTime time, double timeConfidence) : this(intent, confidence) { Time = time; TimeConfidence = timeConfidence; }
public MessageWeather(IntentEnum intent, double confidence) : base(intent, confidence) { }
public MessageTranslate(IntentEnum intent, double confidence, string translate) : base(intent, confidence) { this.RawMessage = translate; }