예제 #1
0
 private void OnNodeChangeEvent(NodeChangeEvent nodeChangeEvent)
 {
     switch (nodeChangeEvent)
     {
     case GunAddedToNode gan:
         DisableInstructions();
         SetGunVolume(gan.gun);
         break;
     }
 }
예제 #2
0
 private void dispatchNodeRemove(NodeChangeEvent eventJ,
     List<EventListener> nodeChangeListeners)
 {
     lock (nodeChangeListeners) {
     Iterator<EventListener> i = nodeChangeListeners.iterator();
     while (i.hasNext()) {
         NodeChangeListener ncl = (NodeChangeListener) i.next();
         ncl.childRemoved(eventJ);
     }
     }
 }
예제 #3
0
 protected virtual void RaiseNodeChangeEvent(string nodename)
 {
     // Raise the event by using the () operator.
     NodeChangeEvent?.Invoke(this, new NodeChangeEventArgs(nodename));
 }
예제 #4
0
 public virtual void Start()
 {
     onNodeChange = new NodeChangeEvent();
     JumpDuration = TurnHandler.Instance.turnDuration;
     Board.onTurn.AddListener(() => canMove = true);
 }