void add(IInputKeyReceiver re) { if (receiverArray.Length == tail) { Array.Resize(ref receiverArray, checked (tail * 2)); } receiverArray[tail++] = re; }
/// <summary> /// 指定した Updatable を Update 対象から除外する. /// </summary> public static void Remove(IInputKeyReceiver updatable) { if (updatable == null) { return; } sender.remove(updatable); }
/// <summary> /// Update 対象の追加. /// </summary> public static void Add(IInputKeyReceiver re) { if (re == null) { return; } sender.add(re); }
void remove(IInputKeyReceiver updatable) { for (int i = 0; i < receiverArray.Length; i++) { if (receiverArray[i] == updatable) { receiverArray[i] = null; refreshUpdatableArray(); return; } } }