Esempio n. 1
0
 internal MessageArgument(string name, object value, bool readOnly)
 {
     this.name = name;
     this.value = value;
     this.readOnly = readOnly;
     children = new MessageArguments(readOnly);
 }
Esempio n. 2
0
 public Message(string name, params object[] args)
 {
     this.name = name;
     arguments = new MessageArguments(false);
     if (args != null) {
         foreach (object arg in args) {
             arguments.Add(arg);
         }
     }
 }
Esempio n. 3
0
    public static void Send(MessageType message, object arguments = null)
    {
        var messageList = Instance.GetMessageList(message);
        var args        = new MessageArguments(arguments);

        for (int i = 0; i < messageList.Count; i++)
        {
            messageList[i].Invoke(args);
        }
    }
 private void OnKnifeHit(MessageArguments args)
 {
     retryUi.SetActive(true);
 }
 private void OnTargetHit(MessageArguments args)
 {
     score         += scorePerValidHit;
     scoreText.text = score.ToString();
 }
Esempio n. 6
0
 /// <summary>
 /// �׳���Ϣ�����¼�
 /// </summary>
 /// <param name="e"></param>
 protected void OnProcessMessage(MessageArguments e)
 {
     if (this.ProcessMessageEvent != null && e.Message != null)
         ProcessMessageEvent(null, e);
 }
Esempio n. 7
0
 internal Message(string name)
 {
     this.name = name;
     arguments = new MessageArguments(false);
     attributes = new MessageAttributes(this);
 }
 private void OnTargetHit(MessageArguments args)
 {
     Debug.Log(this.name + " is instancing a new knife");
     knifeInstance = MakeKnife(knifePrefab, transform.position);
 }