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

            InitializeView();
        }
Exemple #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);
        }
 public SmokeParticleDelegate(AtlasGlobal atlas, float totalLife)
     : base(atlas)
 {
     _totalLife = totalLife;
     drag = 1;
     strength = new RangeF();
 }
Exemple #5
0
        public UIView(AtlasGlobal atlas, RectangleF frame)
            : base(atlas)
        {
            Frame = frame;

            InitializeView();
        }
        public EntityManager(AtlasGlobal atlas)
            : base(atlas)
        {
            _teams = new Dictionary<string, EntityTeam>();

            _key = new object();
        }
Exemple #7
0
        public Emitter(AtlasGlobal atlas, IParticleDelegate particleProcessor)
            : base(atlas)
        {
            alive = false;

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

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

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

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

            _teamArray = new Entity[0];
        }
Exemple #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);
            };
        }
        public SeekerEntity(AtlasGlobal atlas, EntityTeam team, Vector2 position)
            : base(atlas, team)
        {
            _radius = 7;
            _angle = 0;

            this._position = position;

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

            PerpectiveNumber = 0;

            _started = false;
        }
Exemple #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);
            };
        }
        public GridManager(AtlasGlobal atlas)
            : base(atlas)
        {
            _trunk = new GridTrunk(atlas);

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

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

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

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

            Restart(true);
        }
Exemple #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;
        }
Exemple #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;
        }
Exemple #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;
        }
Exemple #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;
        }
        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);
        }
        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);
        }
Exemple #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;
        }
 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;
 }
Exemple #28
0
 public UILabel(AtlasGlobal atlas, RectangleF frame)
     : base(atlas, frame)
 {
 }
 public PlayerEntityDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
 public VictoryComputerDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
 public virtual void Draw(AtlasGlobal atlas)
 {
 }
Exemple #32
0
 public UILabel(AtlasGlobal atlas, RectangleF frame)
     : base(atlas, frame)
 {
 }
 public KrisEntityDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
     _subs = new List<EntityAgent>();
     _seekers = new List<SeekerAgent>();
 }
Exemple #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;
 }
 public ParticleDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
Exemple #37
0
 public AtlasEntity(AtlasGlobal atlas)
 {
     a = atlas;
 }
 public ParticleDelegate(AtlasGlobal atlas) : base(atlas)
 {
 }
Exemple #39
0
 public ParticleManager(AtlasGlobal atlas)
     : base(atlas)
 {
     emitters = new Dictionary<string, Emitter>();
 }
Exemple #40
0
 public Entity(AtlasGlobal atlas, EntityTeam team)
     : base(atlas)
 {
     _team = team;
     Id = Guid.NewGuid().ToString();
 }
Exemple #41
0
 public ParticleManager(AtlasGlobal atlas)
     : base(atlas)
 {
     emitters = new Dictionary <string, Emitter>();
 }