public static Entity LoadDreamTunnelEntry(Level level, LevelData levelData, Vector2 offset, EntityData entityData) { Spikes.Directions orientation = entityData.Enum <Spikes.Directions>("orientation"); return(new DreamTunnelEntry(entityData.Position + offset, GetSize(entityData, orientation), orientation, entityData.Bool("overrideAllowStaticMovers"), entityData.Int("depth", Depths.FakeWalls))); }
public DreamTunnelEntry(Vector2 position, float size, Spikes.Directions orientation, bool overrideAllowStaticMovers, int depth) : base(position, size, orientation, overrideAllowStaticMovers) { Depth = depth - 10; originalDepth = depth; surfaceSoundIndex = SurfaceIndex.DreamBlockInactive; particleTextures = new MTexture[] { GFX.Game["objects/dreamblock/particles"].GetSubtexture(14, 0, 7, 7, null), GFX.Game["objects/dreamblock/particles"].GetSubtexture(7, 0, 7, 7, null), GFX.Game["objects/dreamblock/particles"].GetSubtexture(0, 0, 7, 7, null), GFX.Game["objects/dreamblock/particles"].GetSubtexture(7, 0, 7, 7, null) }; }