Ejemplo n.º 1
0
        public Entity()
        {
            Name          = GetType().Name;
            EntityId      = -1;
            RenderId      = -1;
            ComponentMask = 0;
            EntityFlags   = 0;

            // By default all entities update, change to false?
            SetCanUpdate(true);

            Events = null;

            // TODO: if editor?
            SetChangedInEditor(true);

            InitializeFunction = null;
        }
Ejemplo n.º 2
0
        public override void Initialize()
        {
            base.Initialize();

            Collision.SetCube(new Cube(new Float4(0.0f), new Float4(0.25f, 0.25f, 0.5f, 0.0f), Quaternion.Default));

            PlayerCamera.SetPosition(Transform.Position);

            PlayerController.SetMouseCentered(true);
            PlayerController.ControlEntity(this);
            PlayerController.SetInputMapping(new PlayerInputMapping());

            // Events
            Events = new EventBindings
            {
                OnCollision = OnCollision
            };
        }