コード例 #1
0
ファイル: FoodType.cs プロジェクト: romeguarin/XNAZuneGames
        /// <summary>
        /// Acts as the food item's draw method, but instead of drawing straight to the screen, it fills the level's grid
        /// with its texture, which is drawn when the grid is drawn.
        /// </summary>
        /// <param name="grid">The level's grid.</param>
        public void fillGrid(LevelType level)
        {
            rotation = MovementFunctions.calculateRotation(ai.Orientation);

            PortalType portal;

            if (level.tryGetPortal(vector, out portal))
            {
                portal.fillGrid(level);
            }

            fill(level.Grid);
        }
コード例 #2
0
ファイル: SnakeParts.cs プロジェクト: romeguarin/XNAZuneGames
        public virtual void fillGrid(GameGrid grid, Color color)
        {
            float rotation = MovementFunctions.calculateRotation(orientation);

            grid.GetCell(vector).fillCell(CellContent.snake, texture, rotation, color);
        }
コード例 #3
0
ファイル: FoodType.cs プロジェクト: romeguarin/XNAZuneGames
        /// <summary>
        /// Initializes the food item's AI agent and the rotation of the food item.
        /// </summary>
        public void initialize()
        {
            ai.initialize();

            rotation = MovementFunctions.calculateRotation(ai.Orientation);
        }