Changeset 103

Show
Ignore:
Timestamp:
04/14/2012 07:20:42 PM (2 years ago)
Author:
acarter
Message:

Finished basic structure for FSM minigame.

Location:
Code/oMaE/oMaE
Files:
6 added
3 modified

Legend:

Unmodified
Added
Removed
  • Code/oMaE/oMaE/MinigameFactory.cs

    r102 r103  
    4141        public override void LoadContent(ContentManager Content) 
    4242        { 
     43            minigames.Add(new FSM()); 
    4344            minigames.Add(new BaseChanger()); 
    4445            foreach (BalanceGame balance in Content.Load<BalanceGame[]>("AppData/Balance")) 
  • Code/oMaE/oMaE/Screen2D.cs

    r102 r103  
    289289            spriteBatch.End(); 
    290290        } 
     291        /// <summary> 
     292        /// Draws an arrow 
     293        /// </summary> 
     294        /// <param name="Head">The head of the arrow</param> 
     295        /// <param name="Tail">The tail of the arrow</param> 
     296        /// <param name="ArrowHeight">The height of the arrow</param> 
     297        /// <param name="ArrowWidth">The width of the arrow</param> 
     298        /// <param name="LineWidth">The line width</param> 
     299        /// <param name="color">The color</param> 
     300        public void DrawArrow(Vector2 Head, Vector2 Tail, float ArrowHeight, float ArrowWidth, float LineWidth, Color color) 
     301        { 
     302            Vector2 Dir = Tail - Head; 
     303            Dir.Normalize(); 
     304            Vector2 Perp = new Vector2(Dir.Y, Dir.X); 
     305            DrawLine(Head, Tail, LineWidth, color); 
     306            DrawLine(Head, Head + ArrowHeight * Dir + ArrowWidth * Perp, LineWidth, color); 
     307            DrawLine(Head, Head + ArrowHeight * Dir - ArrowWidth * Perp, LineWidth, color); 
     308        } 
    291309    } 
    292310} 
  • Code/oMaE/oMaE/oMaE.csproj

    r102 r103  
    171171    <Compile Include="Widgets\Button.cs" /> 
    172172    <Compile Include="Widgets\ComboBox.cs" /> 
     173    <Compile Include="Widgets\CompassSelector.cs" /> 
    173174    <Compile Include="Widgets\DigitSelect.cs" /> 
    174175    <Compile Include="Widgets\effect_sketch.cs" />