public EmploymentController(IEmployeeHandler employeeHandler, ITaskHandler taskHandler, IEmployerHandler employerHandler, ILevelHandler levelHandler)
 {
     _employeeHandler = employeeHandler;
     _employerHandler = employerHandler;
     _levelHandler    = levelHandler;
     _taskHandler     = taskHandler;
 }
Exemple #2
0
 public HomeController(IEmployeeHandler employeeHandler, IPersonHandler personHandler, ITaskHandler taskHandler, IEmployerHandler employerHandler, ILevelHandler levelHandler)
 {
     _employeeHandler = employeeHandler;
     _employerHandler = employerHandler;
     _levelHandler    = levelHandler;
     _taskHandler     = taskHandler;
     _personHandler   = personHandler;
 }
Exemple #3
0
        public static void Create(ILevelHandler levelHandler, Vector3 pos, ushort type)
        {
            Explosion explosion = new Explosion();

            explosion.OnActivated(new ActorActivationDetails {
                LevelHandler = levelHandler,
                Pos          = pos,
                Params       = new[] { type }
            });
            levelHandler.AddActor(explosion);
        }
Exemple #4
0
            public ChainPiece(ILevelHandler levelHandler, Vector3 pos, PlatformType type)
            {
                this.levelHandler = levelHandler;

                Transform transform = AddComponent <Transform>();

                Transform.Pos = pos;

                CollisionFlags = CollisionFlags.ForceDisableCollisions;

                RequestMetadata("MovingPlatform/" + type.ToString("G"));
                SetAnimation("Chain");
            }
Exemple #5
0
            public ChainPiece(ILevelHandler levelHandler, Vector3 pos, int distance)
            {
                this.levelHandler = levelHandler;
                this.distance     = distance;

                Transform transform = AddComponent <Transform>();

                Transform.Pos = pos;

                CollisionFlags = CollisionFlags.ForceDisableCollisions;

                RequestMetadata("MovingPlatform/SpikeBall");
                SetAnimation("Chain");
            }
Exemple #6
0
        public TileMap(ILevelHandler levelHandler, string tilesetPath, ColorRgba[] tileMapPalette, bool hasPit)
        {
            this.levelHandler = levelHandler;
            this.hasPit       = hasPit;

            tileset = new TileSet(tilesetPath, true, tileMapPalette);

            if (!tileset.IsValid)
            {
                throw new InvalidDataException("Tileset is corrupted");
            }

            triggerState = new BitArray(TriggerCount);
        }
Exemple #7
0
        public TileMap(ILevelHandler levelHandler, string tilesetPath, bool hasPit)
        {
            this.levelHandler = levelHandler;
            this.hasPit       = hasPit;

            IImageCodec codec = ImageCodec.GetRead(ImageCodec.FormatPng);

            tileset = new TileSet(tilesetPath);

            if (!tileset.IsValid)
            {
                throw new InvalidDataException("Tileset is corrupted");
            }

            triggerState = new BitArray(TriggerCount);
        }
Exemple #8
0
        public void ReleaseResources()
        {
            if (tileset != null)
            {
                tileset.Dispose();
                tileset = null;
            }

            layers                = null;
            animatedTiles         = null;
            activeCollapsingTiles = null;

            debrisList = null;

            levelHandler = null;
        }
Exemple #9
0
        public async void OnActivated(ILevelHandler levelHandler, Vector3 pos, string metadataPath, CollisionFlags collisionFlags)
        {
            initState = InitState.Initializing;

            this.levelHandler   = levelHandler;
            this.flags          = ActorInstantiationFlags.None;
            this.CollisionFlags = (collisionFlags & ~CollisionFlags.ApplyGravitation);

            double timeNow = NetTime.Now;

            for (int i = 0; i < stateBuffer.Length; i++)
            {
                stateBuffer[i].Time = timeNow - stateBuffer.Length + i;
                stateBuffer[i].Pos  = pos.Xy;
            }
            posZ = pos.Z;

            health = int.MaxValue;

            friction = 1.5f;

            originTile = new Point2((int)(pos.X / 32), (int)(pos.Y / 32));

            Transform transform = AddComponent <Transform>();

            transform.Pos = pos;

            AddComponent(new LocalController(this));

            //await OnActivatedAsync(details);

            await RequestMetadataAsync(metadataPath);

            if (initState == InitState.Initializing)
            {
                initState = InitState.Initialized;
            }
        }
Exemple #10
0
 public TaskController(ITaskHandler taskHandler, ILevelHandler levelHandler)
 {
     _levelHandler = levelHandler;
     _taskHandler  = taskHandler;
 }
Exemple #11
0
 public LevelController(ILevelHandler levelHandler)
 {
     LevelHandler = levelHandler;
 }
Exemple #12
0
        public EventSpawner(ILevelHandler levelHandler)
        {
            this.levelHandler = levelHandler;

            InitializeSpawnableList();
        }