public PatternAI(PatternAIData data) { for (int i = 0; i < data.Pattern.pattern.Length; i++) { pattern.Enqueue(data.Pattern.pattern[i]); } NotificationCenter.AddListener <ActionResultNotification>(OnActionResultNotification); }
private void Start() { NotificationCenter.AddListener <StatChange> (OnStatChange); }
public ProjectileAI() { direction = new Vector2Int(1, 0); NotificationCenter.AddListener <ActionResultNotification>(OnActionResultNotification); }
public void StartListeningEventsFrom(NotificationCenter notificationCenter) { notificationCenter.AddListener(GameEvents.coordinateOccupied, AddOccupiedCoordinate); notificationCenter.AddListener(GameEvents.coordinateDisoccupied, RemoveOccupiedCoordinate); }