Ejemplo n.º 1
0
 public SmokeParticleDelegate(AtlasGlobal atlas, float totalLife)
     : base(atlas)
 {
     _totalLife = totalLife;
     drag       = 1;
     strength   = new RangeF();
 }
Ejemplo n.º 2
0
        public UIView(AtlasGlobal atlas, RectangleF frame)
            : base(atlas)
        {
            Frame = frame;

            InitializeView();
        }
Ejemplo n.º 3
0
        public AtlasGraphics(AtlasGlobal atlas, GraphicsDeviceManager _graphicsDeviceManager)
            : base(atlas)
        {
            _currentMode = AtlasGraphicsMode.None;

            _graphicsDevice = atlas.Game.GraphicsDevice;
            this._graphicsDeviceManager = _graphicsDeviceManager;

            _graphicsDeviceManager.PreferredBackBufferFormat = SurfaceFormat.Color;

            #if XNA
            _graphicsDeviceManager.PreferredBackBufferHeight = 768;
            _graphicsDeviceManager.PreferredBackBufferWidth = 1024;
            #endif
            ////_graphicsDeviceManager.IsFullScreen = true;
            _graphicsDeviceManager.ApplyChanges();

            _spriteBatch = new SpriteBatch(_graphicsDevice);

            _basicEffect = new BasicEffect(_graphicsDeviceManager.GraphicsDevice);

            batch = new VertexPositionColorTexture[32][];
            batchPrimitiveCount = new int[batch.Length];

            _viewPort = new Viewport(0, 0,
                _graphicsDeviceManager.PreferredBackBufferWidth,
                _graphicsDeviceManager.PreferredBackBufferHeight);
        }
Ejemplo n.º 4
0
 public SmokeParticleDelegate(AtlasGlobal atlas, float totalLife)
     : base(atlas)
 {
     _totalLife = totalLife;
     drag = 1;
     strength = new RangeF();
 }
Ejemplo n.º 5
0
        public UIView(AtlasGlobal atlas, RectangleF frame)
            : base(atlas)
        {
            Frame = frame;

            InitializeView();
        }
Ejemplo n.º 6
0
        public EntityManager(AtlasGlobal atlas)
            : base(atlas)
        {
            _teams = new Dictionary<string, EntityTeam>();

            _key = new object();
        }
Ejemplo n.º 7
0
        public Emitter(AtlasGlobal atlas, IParticleDelegate particleProcessor)
            : base(atlas)
        {
            alive = false;

            this.particleProcessor = particleProcessor;
            particles = new List<Part>();
        }
Ejemplo n.º 8
0
        public TrailParticleDelegate(AtlasGlobal atlas, float totalLife)
            : base(atlas)
        {
            _totalLife = totalLife;
            color = Color.White;

            Atlas.Content.LoadContent("part");
        }
Ejemplo n.º 9
0
        public Emitter(AtlasGlobal atlas, IParticleDelegate particleProcessor)
            : base(atlas)
        {
            alive = false;

            this.particleProcessor = particleProcessor;
            particles = new List <Part>();
        }
Ejemplo n.º 10
0
        public TrailParticleDelegate(AtlasGlobal atlas, float totalLife)
            : base(atlas)
        {
            _totalLife = totalLife;
            color      = Color.White;

            Atlas.Content.LoadContent("part");
        }
Ejemplo n.º 11
0
        public EntityTeam(AtlasGlobal atlas, EntityDelegate teamDelegate)
            : base(atlas)
        {
            _delegate = teamDelegate;
            Color = Color.White;
            _team = new List<Entity>();

            _teamArray = new Entity[0];
        }
Ejemplo n.º 12
0
        public UIManager(AtlasGlobal atlas)
            : base(atlas)
        {
            View = new UIView(atlas, new RectangleF(0, 0, 640, 480));

            Atlas.Graphics.onResolutionChange += () =>
            {
                View.Frame = new RectangleF(0, 0, Atlas.Graphics.ResolutionWidth, Atlas.Graphics.ResolutionHeight);
            };
        }
Ejemplo n.º 13
0
        public SeekerEntity(AtlasGlobal atlas, EntityTeam team, Vector2 position)
            : base(atlas, team)
        {
            _radius = 7;
            _angle = 0;

            this._position = position;

            _wantedVelocity = Vector2.Zero;
        }
Ejemplo n.º 14
0
        public StateController(AtlasGlobal atlas)
            : base(atlas)
        {
            this.State = GameState.Paused;
            this.Perpective = PerpectiveState.World;

            PerpectiveNumber = 0;

            _started = false;
        }
Ejemplo n.º 15
0
        public UIManager(AtlasGlobal atlas)
            : base(atlas)
        {
            View = new UIView(atlas, new RectangleF(0, 0, 640, 480));

            Atlas.Graphics.onResolutionChange += () =>
            {
                View.Frame = new RectangleF(0, 0, Atlas.Graphics.ResolutionWidth, Atlas.Graphics.ResolutionHeight);
            };
        }
Ejemplo n.º 16
0
        public GridManager(AtlasGlobal atlas)
            : base(atlas)
        {
            _trunk = new GridTrunk(atlas);

            try {
                var json = GridJson.FromFile("map.json");
                _trunk.FromJson(json);
            } catch { }
        }
Ejemplo n.º 17
0
        public CameraManager(AtlasGlobal atlas, float raduis)
            : base(atlas)
        {
            this._raduis = raduis;

            Atlas.Graphics.onResolutionChange += () =>
            {
                _viewport = Atlas.Graphics.ViewPort;
                _dirty    = true;
            };

            Restart(true);
        }
Ejemplo n.º 18
0
        public CameraManager(AtlasGlobal atlas, float raduis)
            : base(atlas)
        {
            this._raduis = raduis;

            Atlas.Graphics.onResolutionChange += () =>
            {
                _viewport = Atlas.Graphics.ViewPort;
                _dirty = true;
            };

            Restart(true);
        }
Ejemplo n.º 19
0
        public Part(AtlasGlobal atlas, IParticleDelegate processor)
            : base(atlas)
        {
            this.processor = processor;

            vectors = new Vector2[processor.VectorCount];

            position = Vector2.Zero;
            angle    = 0;
            scale    = 1;

            alive = false;
        }
Ejemplo n.º 20
0
        public Part(AtlasGlobal atlas, IParticleDelegate processor)
            : base(atlas)
        {
            this.processor = processor;

            vectors = new Vector2[processor.VectorCount];

            position = Vector2.Zero;
            angle = 0;
            scale = 1;

            alive = false;
        }
Ejemplo n.º 21
0
        public AtlasComponent(IAtlasGamePage gamePage, GraphicsDeviceManager graphicsDeviceManager)
            : base(gamePage.Game)
        {
            this.gamePage = gamePage;

            managers = new Dictionary<string, IAtlasManager>();
            managerDrawSorter = new List<AtlasManagerSorter>();
            managerUpdateSorter = new List<AtlasManagerSorter>();
            dirty = true;

            atlas = new AtlasGlobal(this, graphicsDeviceManager);

            firstFrame = true;
        }
Ejemplo n.º 22
0
        public AtlasComponent(IAtlasGamePage gamePage, GraphicsDeviceManager graphicsDeviceManager)
            : base(gamePage.Game)
        {
            this.gamePage = gamePage;

            managers            = new Dictionary <string, IAtlasManager>();
            managerDrawSorter   = new List <AtlasManagerSorter>();
            managerUpdateSorter = new List <AtlasManagerSorter>();
            dirty = true;

            atlas = new AtlasGlobal(this, graphicsDeviceManager);

            firstFrame = true;
        }
Ejemplo n.º 23
0
        public static void DrawFov(AtlasGlobal atlas, Entity e)
        {
            VertexPositionColorTexture[] vpct = new VertexPositionColorTexture[4];

            vpct[0].Color = vpct[2].Color = Color.Blue;
            vpct[0].Position = vpct[2].Position = new Vector3(e.Position, 0);

            vpct[1].Position = new Vector3(
                e.Position.X + (float)Math.Cos(e.Angle + e.FOV * 0.5f) * 64,
                e.Position.Y + (float)Math.Sin(e.Angle + e.FOV * 0.5f) * 64, 0);
            vpct[3].Position = new Vector3(
                e.Position.X + (float)Math.Cos(e.Angle - e.FOV * 0.5f) * 64,
                e.Position.Y + (float)Math.Sin(e.Angle - e.FOV * 0.5f) * 64, 0);

            atlas.Graphics.SetPrimitiveType(PrimitiveType.LineList);
            atlas.Graphics.DrawVector(vpct);
        }
Ejemplo n.º 24
0
        public static void DrawPath(AtlasGlobal atlas, List<Vector2> path)
        {
            if (path == null || path.Count == 2)
            {
                return;
            }

            VertexPositionColorTexture[] vpct = new VertexPositionColorTexture[path.Count];

            for (int i = 0; i < path.Count; i++)
            {
                vpct[i].Position = new Vector3(path[i], 0);
                vpct[i].Color = AtlasColorSystem.RGBFromHSL(i * 16, 0.2f, 0.2f) * 0.5f;
            }

            atlas.Graphics.SetPrimitiveType(PrimitiveType.LineStrip);
            atlas.Graphics.DrawVector(vpct);
        }
Ejemplo n.º 25
0
        public GridTrunk(AtlasGlobal atlas)
            : base(atlas)
        {
            _debugVpct = new VertexPositionColorTexture[256];
            _debugCounter = 0;

            _heightMap = new GridObject<byte>(64, 64, 0);
            _tileMap = new GridObject<short>(64, 64, 0);

            _visitedMap = new bool[64, 64];

            _width = _heightMap.Width;
            _height = _heightMap.Height;

            _tileSize = 16;

            Version = 0;
        }
Ejemplo n.º 26
0
 public override void Draw(AtlasGlobal atlas)
 {
     EntityTypes.EntityDebugHelpers.DrawPath(atlas, Path);
 }
 public VictoryComputerEntity(AtlasGlobal atlas, EntityTeam team, Vector2 position)
     : base(atlas, team)
 {
     this._position = position;
 }
Ejemplo n.º 28
0
 public UILabel(AtlasGlobal atlas, RectangleF frame)
     : base(atlas, frame)
 {
 }
 public PlayerEntityDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
 public VictoryComputerDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
Ejemplo n.º 31
0
 public virtual void Draw(AtlasGlobal atlas)
 {
 }
Ejemplo n.º 32
0
 public UILabel(AtlasGlobal atlas, RectangleF frame)
     : base(atlas, frame)
 {
 }
Ejemplo n.º 33
0
 public KrisEntityDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
     _subs = new List<EntityAgent>();
     _seekers = new List<SeekerAgent>();
 }
Ejemplo n.º 34
0
 public static void DrawEntity(AtlasGlobal atlas,  EntityStruct entity, Color color)
 {
     atlas.Graphics.DrawSprite(atlas.Content.GetContent<Texture2D>("image/simple"),
         entity.position, null,
         Color.Lerp(color, Color.Black, entity.crouching ? 0.25f : 0),
         Vector2.One * 16,
         entity.angle - MathHelper.PiOver2, entity.radius / 16);
 }
 public AlekEntitySubDelegate(AtlasGlobal atlas, Entity e, AlekEntityDelegate parentDelegate)
     : base(atlas)
 {
     this.parentDelegate = parentDelegate;
     entity = e;
 }
Ejemplo n.º 36
0
 public ParticleDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
Ejemplo n.º 37
0
 public AtlasEntity(AtlasGlobal atlas)
 {
     a = atlas;
 }
Ejemplo n.º 38
0
 public ParticleDelegate(AtlasGlobal atlas) : base(atlas)
 {
 }
Ejemplo n.º 39
0
 public ParticleManager(AtlasGlobal atlas)
     : base(atlas)
 {
     emitters = new Dictionary<string, Emitter>();
 }
Ejemplo n.º 40
0
 public Entity(AtlasGlobal atlas, EntityTeam team)
     : base(atlas)
 {
     _team = team;
     Id = Guid.NewGuid().ToString();
 }
Ejemplo n.º 41
0
 public ParticleManager(AtlasGlobal atlas)
     : base(atlas)
 {
     emitters = new Dictionary <string, Emitter>();
 }