コード例 #1
0
 public SmokeParticleDelegate(AtlasGlobal atlas, float totalLife)
     : base(atlas)
 {
     _totalLife = totalLife;
     drag       = 1;
     strength   = new RangeF();
 }
コード例 #2
0
ファイル: UIView.cs プロジェクト: Racura/AtlasEngine
        public UIView(AtlasGlobal atlas, RectangleF frame)
            : base(atlas)
        {
            Frame = frame;

            InitializeView();
        }
コード例 #3
0
ファイル: AtlasGraphics.cs プロジェクト: Racura/AtlasEngine
        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);
        }
コード例 #4
0
 public SmokeParticleDelegate(AtlasGlobal atlas, float totalLife)
     : base(atlas)
 {
     _totalLife = totalLife;
     drag = 1;
     strength = new RangeF();
 }
コード例 #5
0
ファイル: UIView.cs プロジェクト: Racura/AtlasEngine
        public UIView(AtlasGlobal atlas, RectangleF frame)
            : base(atlas)
        {
            Frame = frame;

            InitializeView();
        }
コード例 #6
0
        public EntityManager(AtlasGlobal atlas)
            : base(atlas)
        {
            _teams = new Dictionary<string, EntityTeam>();

            _key = new object();
        }
コード例 #7
0
ファイル: Emitter.cs プロジェクト: Racura/AtlasEngine
        public Emitter(AtlasGlobal atlas, IParticleDelegate particleProcessor)
            : base(atlas)
        {
            alive = false;

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

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

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

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

            _teamArray = new Entity[0];
        }
コード例 #12
0
ファイル: UIManager.cs プロジェクト: Racura/AtlasEngine
        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);
            };
        }
コード例 #13
0
        public SeekerEntity(AtlasGlobal atlas, EntityTeam team, Vector2 position)
            : base(atlas, team)
        {
            _radius = 7;
            _angle = 0;

            this._position = position;

            _wantedVelocity = Vector2.Zero;
        }
コード例 #14
0
        public StateController(AtlasGlobal atlas)
            : base(atlas)
        {
            this.State = GameState.Paused;
            this.Perpective = PerpectiveState.World;

            PerpectiveNumber = 0;

            _started = false;
        }
コード例 #15
0
ファイル: UIManager.cs プロジェクト: Racura/AtlasEngine
        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);
            };
        }
コード例 #16
0
        public GridManager(AtlasGlobal atlas)
            : base(atlas)
        {
            _trunk = new GridTrunk(atlas);

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

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

            Restart(true);
        }
コード例 #18
0
ファイル: CameraManager.cs プロジェクト: Racura/AtlasEngine
        public CameraManager(AtlasGlobal atlas, float raduis)
            : base(atlas)
        {
            this._raduis = raduis;

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

            Restart(true);
        }
コード例 #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;
        }
コード例 #20
0
ファイル: Part.cs プロジェクト: Racura/AtlasEngine
        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;
        }
コード例 #21
0
ファイル: AtlasComponent.cs プロジェクト: Racura/AtlasEngine
        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;
        }
コード例 #22
0
ファイル: AtlasComponent.cs プロジェクト: Racura/AtlasEngine
        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;
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #25
0
ファイル: GridTrunk.cs プロジェクト: Racura/IntelligentRobots
        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;
        }
コード例 #26
0
 public override void Draw(AtlasGlobal atlas)
 {
     EntityTypes.EntityDebugHelpers.DrawPath(atlas, Path);
 }
コード例 #27
0
 public VictoryComputerEntity(AtlasGlobal atlas, EntityTeam team, Vector2 position)
     : base(atlas, team)
 {
     this._position = position;
 }
コード例 #28
0
 public UILabel(AtlasGlobal atlas, RectangleF frame)
     : base(atlas, frame)
 {
 }
コード例 #29
0
 public PlayerEntityDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
コード例 #30
0
 public VictoryComputerDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
コード例 #31
0
 public virtual void Draw(AtlasGlobal atlas)
 {
 }
コード例 #32
0
ファイル: UILabel.cs プロジェクト: Racura/AtlasEngine
 public UILabel(AtlasGlobal atlas, RectangleF frame)
     : base(atlas, frame)
 {
 }
コード例 #33
0
 public KrisEntityDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
     _subs = new List<EntityAgent>();
     _seekers = new List<SeekerAgent>();
 }
コード例 #34
0
ファイル: Entity.cs プロジェクト: Racura/IntelligentRobots
 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);
 }
コード例 #35
0
 public AlekEntitySubDelegate(AtlasGlobal atlas, Entity e, AlekEntityDelegate parentDelegate)
     : base(atlas)
 {
     this.parentDelegate = parentDelegate;
     entity = e;
 }
コード例 #36
0
 public ParticleDelegate(AtlasGlobal atlas)
     : base(atlas)
 {
 }
コード例 #37
0
ファイル: AtlasEntity.cs プロジェクト: Racura/AtlasEngine
 public AtlasEntity(AtlasGlobal atlas)
 {
     a = atlas;
 }
コード例 #38
0
 public ParticleDelegate(AtlasGlobal atlas) : base(atlas)
 {
 }
コード例 #39
0
ファイル: ParticleManager.cs プロジェクト: Racura/AtlasEngine
 public ParticleManager(AtlasGlobal atlas)
     : base(atlas)
 {
     emitters = new Dictionary<string, Emitter>();
 }
コード例 #40
0
ファイル: Entity.cs プロジェクト: Racura/IntelligentRobots
 public Entity(AtlasGlobal atlas, EntityTeam team)
     : base(atlas)
 {
     _team = team;
     Id = Guid.NewGuid().ToString();
 }
コード例 #41
0
ファイル: ParticleManager.cs プロジェクト: Racura/AtlasEngine
 public ParticleManager(AtlasGlobal atlas)
     : base(atlas)
 {
     emitters = new Dictionary <string, Emitter>();
 }