コード例 #1
0
 public Player(double x, double y, int width, int height, string texture, StateMachine stateMachine, TileMap map, GameLevel level) : base(x, y, width, height, texture, stateMachine, map, level)
 {
     Score = 0;
 }
コード例 #2
0
ファイル: Snail.cs プロジェクト: Nekketsu/CS50G
 public Snail(string texture, double x, double y, int width, int height, StateMachine stateMachine, TileMap map, GameLevel level) : base(x, y, width, height, texture, stateMachine, map, level)
 {
 }
コード例 #3
0
        public Entity(double x, double y, int width, int height, string texture, StateMachine stateMachine, TileMap map, GameLevel level)
        {
            // position
            X = x;
            Y = y;

            // velocity
            Dx = 0;
            Dy = 0;

            // dimensions
            Width  = width;
            Height = height;

            Texture      = texture;
            StateMachine = stateMachine;

            Direction = Direction.Left;

            // reference to tilemap so we can check collisions
            Map = map;

            // reference to level for tests against other entities + objects
            Level = level;
        }