Exemplo n.º 1
0
 void Start()
 {
     Screen.sleepTimeout = SleepTimeout.NeverSleep;
     Instance            = this;
     XfRecognizerListener.OngetResultStr += OnGetVoiceResult;
     IFlyVoice.initIFlyVoice();
 }
Exemplo n.º 2
0
    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 = "";
        }
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     _txt        = GetComponent <Text>();
     _startColor = _txt.color;
     _startSize  = _txt.fontSize;
     _stats      = GameObject.FindGameObjectWithTag("Stats").GetComponent <Stats>();
     _chat       = GameObject.FindGameObjectWithTag("Chat").GetComponent <ChatBehaviour>();
 }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        Collided = false;
        uiText   = GameObject.FindGameObjectWithTag("uiTimer");
        uiScript = uiText.GetComponent <UITimeBehaviour>();

        chat = GameObject.FindGameObjectWithTag("Chat").GetComponent <ChatBehaviour>();
    }
Exemplo n.º 5
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;
 }
Exemplo n.º 6
0
    void Start()
    {
        FurnitureBehaviour[] f = GetComponentsInChildren <FurnitureBehaviour>();

        foreach (FurnitureBehaviour fe in f)
        {
            fe.ParentRoom = this;
        }

        chat = GameObject.FindGameObjectWithTag("Chat").GetComponent <ChatBehaviour>();

        GetComponent <RandomDustPlacement>().GenerateDust();
    }
Exemplo n.º 7
0
    // Start is called before the first frame update
    void Start()
    {
        gnt = this.GetComponent <GridNetworkTransform>();
        if (gnt == null)
        {
            throw new BadComponentException("This component requires a GridNetworkTransform on the object as well");
        }

        cb = this.GetComponent <ChatBehaviour>();
        if (cb == null)
        {
            throw new BadComponentException("Without a ChatBehaviour, the player cannot chat");
        }
    }
Exemplo n.º 8
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
                    );
            }
        }
    }
Exemplo n.º 9
0
 private void HandleNewMessage(ChatBehaviour sender, string message)
 {
     sender.StopAllCoroutines();
     sender.chatText.text = message;
     sender.StartCoroutine(DeleteChatMessage(sender.cg));
 }
Exemplo n.º 10
0
 // Use this for initialization
 void Awake()
 {
     instance = this;
     messages = new List <GameObject>();
 }
Exemplo n.º 11
0
 private void checkPlayerObj()
 {
     playerObj  = NetworkClient.localPlayer.gameObject;
     playerChat = playerObj.GetComponent(typeof(ChatBehaviour)) as ChatBehaviour;
 }
Exemplo n.º 12
0
 private void Start()
 {
     boxController = GetComponent <BoxcastController>();
     player        = GetComponent <Player>();
     chat          = GetComponent <ChatBehaviour>();
 }