<commit_before>﻿using Microsoft.Xna.Framework;

namespace GameEngine.GameObjects
{
    /// <summary>
    /// Represents a Static object on the map that is not associated with any particular Entity
    /// subclass. By wrapping the Entity in this StaticEntity class, the user may specify Update
    /// routines to run within the tile editor through the use of event hooks.
    /// </summary>
    public class StaticEntity : Entity
    {
        public delegate void UpdateEventHandler(Entity caller, GameTime gameTime, TeeEngine engine);

        public event UpdateEventHandler UpdateEvent;

        public override void Update(GameTime gameTime, TeeEngine engine)
        {
            if (UpdateEvent != null)
                UpdateEvent(this, gameTime, engine);
        }
    }
}
<commit_msg>Added PostDestory and PostInitialise Events to StaticEntity.<commit_after>﻿using Microsoft.Xna.Framework;

namespace GameEngine.GameObjects
{
    /// <summary>
    /// Represents a Static object on the map that is not associated with any particular Entity
    /// subclass. By wrapping the Entity in this StaticEntity class, the user may specify Update
    /// routines to run within the tile editor through the use of event hooks.
    /// </summary>
    public class StaticEntity : Entity
    {
        public delegate void EntityEventHandler(Entity caller, GameTime gameTime, TeeEngine engine);

        public event EntityEventHandler UpdateEvent;
        public event EntityEventHandler PostDestroyEvent;
        public event EntityEventHandler PostInitialiseEvent;

        public override void PostInitialize(GameTime gameTime, TeeEngine engine)
        {
            if (PostInitialiseEvent != null)
                PostInitialiseEvent(this, gameTime, engine);
        }

        public override void PostDestroy(GameTime gameTime, TeeEngine engine)
        {
            if (PostDestroyEvent != null)
                PostDestroyEvent(this, gameTime, engine);
        }

        public override void Update(GameTime gameTime, TeeEngine engine)
        {
            if (UpdateEvent != null)
                UpdateEvent(this, gameTime, engine);
        }
    }
}

{'fraction_non_alphanumeric': 0.06605080831408776, 'fraction_numerical': 0.0, 'mean_word_length': 2.61, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5201214', 'n_tokens_mistral': 524, 'n_tokens_neox': 507, 'n_words': 196}