public void OnEndEdit()
    {
        string message = inputField.text;

        if (message != "")
        {
            switch (channel)
            {
            case "say":
                ChatBehaviour.WriteMessage(
                    "[USER] : " + message,
                    MessageType.Say
                    );
                break;

            case "group":
                ChatBehaviour.WriteMessage(
                    "(Group) [USER] : " + message,
                    MessageType.Group
                    );
                break;
            }
            inputField.text = "";
        }
    }
Exemple #2
0
 public void Apply(EntityBehaviour sender, Vector2 cell)
 {
     ChatBehaviour.WriteMessage(
         sender.character.nickname + " use " + _name, MessageType.Combat
         );
     sender.Rotate(cell);
     foreach (Effect effect in _effects)
     {
         effect.Apply(sender, cell);
     }
     sender.character.stats[Characteristic.CurrentAP] -= this.cost;
 }
Exemple #3
0
    public void Resolve(EntityBehaviour sender, EntityBehaviour reciever = null, Vector2 target = new Vector2())
    {
        UniqueEffect effect = _effects[_currentTurn++];

        if (effect != null && (reciever == null || reciever != null && reciever.isAlive))
        {
            string value = effect.ResolveUniqueEffect(sender, reciever, target);
            if (_type == EffectType.Physical || _type == EffectType.Magic || _type == EffectType.Heal || _type == EffectType.Charac)
            {
                string effectType = effect.charac.ToString();
                if (effect.charac.ToString().StartsWith("current"))
                {
                    effectType = effect.charac.ToString().Substring(7);
                }

                ChatBehaviour.WriteMessage(
                    reciever.character.nickname + " : " + value + " " + effectType + " by " + _name + " from " + sender.character.nickname + ".",
                    MessageType.Combat
                    );
            }
        }
    }