Example #1
0
 private IDictionary<HandType, Animation> CreateAnimationsForComputer()
 {
     var matrix = new FrameMatrix (){ Rows = 3, Columns = 3 };
     var handAnimations = new Dictionary<HandType, Animation> ();
     var animation = new Animation (LoadTexture2D (ROCK_XNB), matrix);
     animation.ExpandMultiplier = 3;
     handAnimations.Add (HandType.Rock, animation);
     animation = new Animation (LoadTexture2D (PAPER_XNB), matrix);
     animation.ExpandMultiplier = 3;
     handAnimations.Add (HandType.Paper, animation);
     animation = new Animation (LoadTexture2D (SCISSORS_XNB), matrix);
     animation.ExpandMultiplier = 3;
     handAnimations.Add (HandType.Scissors, animation);
     return handAnimations;
 }
Example #2
0
 public Animation(Texture2D texture, FrameMatrix matrix)
 {
     Texture = texture;
     Matrix = matrix;
     ExpandMultiplier = 1;
 }
Example #3
0
 private IDictionary<HandType, Animation> CreateAnimationsForUser()
 {
     var matrix = new FrameMatrix (){ Rows = 1, Columns = 1 };
     var userHandAnimations = new Dictionary<HandType, Animation> ();
     userHandAnimations.Add (HandType.Rock, new Animation (LoadTexture2D (USER_ROCK_XNB), matrix));
     userHandAnimations.Add (HandType.Paper, new Animation (LoadTexture2D (USER_PAPER_XNB), matrix));
     userHandAnimations.Add (HandType.Scissors, new Animation (LoadTexture2D (USER_SCISSORS_XNB), matrix));
     userHandAnimations.Add (HandType.PaperPressed, new Animation (LoadTexture2D (USER_PAPER_PRESSED_XNB), matrix));
     userHandAnimations.Add (HandType.RockPressed, new Animation (LoadTexture2D (USER_ROCK_PRESSED_XNB), matrix));
     userHandAnimations.Add (HandType.ScissorsPressed, new Animation (LoadTexture2D (USER_SCISSORS_PRESSED_XNB), matrix));
     return userHandAnimations;
 }