private void OnNodeChangeEvent(NodeChangeEvent nodeChangeEvent) { switch (nodeChangeEvent) { case GunAddedToNode gan: DisableInstructions(); SetGunVolume(gan.gun); break; } }
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); } } }
protected virtual void RaiseNodeChangeEvent(string nodename) { // Raise the event by using the () operator. NodeChangeEvent?.Invoke(this, new NodeChangeEventArgs(nodename)); }
public virtual void Start() { onNodeChange = new NodeChangeEvent(); JumpDuration = TurnHandler.Instance.turnDuration; Board.onTurn.AddListener(() => canMove = true); }