<commit_before>/// <reference path="Core.ts" />
/// <reference path="Algebra.ts" />
/// <reference path="Util.ts" />

module ex {
   export class Overlap {
      constructor(public x: number, public y: number) { }
   }

   export class Scene {
      public children: Actor[] = [];
      private engine: Engine;
      private killQueue: Actor[] = [];

      private timers: Timer[] = [];
      private cancelQueue: Timer[] = [];

      public collisionGroups: {[key:string]: Actor[]} = {};

      constructor() {}

      public onActivate: () => void = ()=>{};

      public onDeactivate: () => void = ()=>{};

      public publish(eventType: string, event: GameEvent) {
         this.children.forEach((actor) => {
            actor.triggerEvent(eventType, event);
         });
      }

      public update(engine: Engine, delta: number) {
         var len = 0;
         var start = 0;
         var end = 0;
         var actor;
         // Cycle through actors updating actors
         for (var i = 0, len = this.children.length; i < len; i++) {
            this.children[i].update(engine, delta);
         }

         // Remove actors from scene graph after being killed<commit_msg>Change onActivate and onDeactivate to be methods not properties<commit_after>/// <reference path="Core.ts" />
/// <reference path="Algebra.ts" />
/// <reference path="Util.ts" />

module ex {
   export class Overlap {
      constructor(public x: number, public y: number) { }
   }

   export class Scene {
      public children: Actor[] = [];
      private engine: Engine;
      private killQueue: Actor[] = [];

      private timers: Timer[] = [];
      private cancelQueue: Timer[] = [];

      public collisionGroups: {[key:string]: Actor[]} = {};

      constructor() {}

      public onActivate(): void {
         // will be overridden
      }

      public onDeactivate(): void {
         // will be overridden
      }

      public publish(eventType: string, event: GameEvent) {
         this.children.forEach((actor) => {
            actor.triggerEvent(eventType, event);
         });
      }

      public update(engine: Engine, delta: number) {
         var len = 0;
         var start = 0;
         var end = 0;
         var actor;
         // Cycle through actors updating actors
         for (var i = 0, len = this.children.length; i < len; i++) {
            this.children[i].update(engine, delta);
         }

         // Remove actors from scene graph after being killed
{'fraction_non_alphanumeric': 0.14019448946515398, 'fraction_numerical': 0.0032414910858995136, 'mean_word_length': 2.0823970037453186, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1822062', 'n_tokens_mistral': 707, 'n_tokens_neox': 664, 'n_words': 203}