コード例 #1
0
    public void addCustomAmount()
    {
        Dictionary <string, object> data = new Dictionary <string, object>();

        data.Add(StringFile.addCustomDataKey, this.customAmount);
        TinyEventBus.sharedBus().postEventForKey(StringFile.addCustom, data);
    }
コード例 #2
0
 public static EventBus sharedBus()
 {
     TinyEventBus._sharedBus = TinyEventBus._sharedBus != null ? TinyEventBus._sharedBus : new TinyEventBus();
     return(TinyEventBus._sharedBus);
 }
コード例 #3
0
 void Start()
 {
     TinyEventBus.sharedBus().addObserver(this, StringFile.delete, "deleteEventRecieved");
 }
コード例 #4
0
 public void deleteEventRecieved(Dictionary <string, object> data)
 {
     Destroy(this.gameObject);
     TinyEventBus.sharedBus().removeObserverForKey(StringFile.delete, this);
 }
コード例 #5
0
 public void add()
 {
     TinyEventBus.sharedBus().postEventForKey(StringFile.add);
 }
コード例 #6
0
 public void delete()
 {
     TinyEventBus.sharedBus().postEventForKey(StringFile.delete);
 }
コード例 #7
0
 void Start()
 {
     TinyEventBus.sharedBus().addObserver(this, StringFile.add, "addEventRecieved");
     TinyEventBus.sharedBus().addObserver(this, StringFile.addCustom, "addCustomEventRecieved");
 }