<commit_before>namespace XEngine2 
{
    export class Scene
    {
        public actors: Array<Actor>;
        public game: Game;
        public name: string;
        public mainCamera: CameraComponent;

        constructor(name: string, game: Game)
        {
            this.name = name;
            this.game = game;
            this.actors = new Array();
            this.mainCamera = new CameraComponent();
        }

        public Instantiate(actorToInstantiate : typeof Actor, transform: Transform = null) : Actor
        {
            let instancedActor = Object.create(actorToInstantiate.prototype) as Actor;

            if (transform)
            {
                instancedActor.rootComponent.transform = transform;
            }
<commit_msg>Fix Component instantiation<commit_after>namespace XEngine2 
{
    export class Scene
    {
        public actors: Array<Actor>;
        public game: Game;
        public name: string;
        public mainCamera: CameraComponent;

        constructor(name: string, game: Game)
        {
            this.name = name;
            this.game = game;
            this.actors = new Array();
            this.mainCamera = new CameraComponent();
        }

        public Instantiate(actorToInstantiate : typeof Actor, transform: Transform = null) : Actor
        {
            let instancedActor = new actorToInstantiate() as Actor;

            if (transform)
            {
                instancedActor.rootComponent.transform = transform;
            }

{'fraction_non_alphanumeric': 0.07840531561461794, 'fraction_numerical': 0.00132890365448505, 'mean_word_length': 1.7992565055762082, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2947465', 'n_tokens_mistral': 387, 'n_tokens_neox': 364, 'n_words': 99}