public Player(PlayArea a_playArea, Hashtable a_htDefaultKeys) { m_playArea = a_playArea; MemberName = "Cross"; m_arrow = new Sprite(); m_arrow.Parent = this; m_arrow.Name = "Arrow"; m_arrow.MemberName = "Cross"; m_arrow.Member.CenterRegPoint(); m_arrow.Member = m_arrow.Member; m_arrow.LocZ = 60; //m_arrow.Loc = m_playArea.Grid.GetGfxLocFromGridLoc(m_playArea.Grid.GetGridStartLoc()); if (a_htDefaultKeys.Count == 0) { a_htDefaultKeys = new Hashtable(); a_htDefaultKeys.Add("left", Keys.Left); a_htDefaultKeys.Add("right", Keys.Right); a_htDefaultKeys.Add("up", Keys.Up); a_htDefaultKeys.Add("shoot", Keys.Down); } m_keysSteering = new KeysSteering(a_htDefaultKeys); m_keysSteering.AddPair("left", "right"); m_keysSteering.KeyEvent += new Endogine.KeyEventHandler(m_keysSteering_KeyEvent); m_score = new Score(); m_spTarget = new Sprite(); m_spTarget.MemberName = "Cross"; m_spTarget.CenterRegPoint(); m_spTarget.Blend = 50; m_spTarget.Parent = m_playArea; m_spTarget.LocZ = 50; }
public Grid(PlayArea a_playArea) { m_playArea = a_playArea; HeightProportion = (float)Math.Sqrt(0.75) * 2; //grid is counted so width is twice the number of balls that fit (since every second line is in 0.5 phase) GridSize = new Size(NumBallsWidth * 2 + 1, 12); m_aGrid = new Ball[GridSize.Width, GridSize.Height]; }
public Grid(PlayArea a_playArea) { m_playArea = a_playArea; HeightProportion = (float)Math.Sqrt(0.75)*2; //grid is counted so width is twice the number of balls that fit (since every second line is in 0.5 phase) GridSize = new Size(NumBallsWidth*2+1,12); m_aGrid = new Ball[GridSize.Width, GridSize.Height]; }
public Ball(int a_nType, PlayArea a_playArea) { Parent = a_playArea; m_playArea = a_playArea; string sClr = ""; switch (a_nType) { case 0: sClr = "Red"; break; case 1: sClr = "Green"; break; case 2: sClr = "Blue"; break; case 3: sClr = "Yellow"; break; case 4: sClr = "Purple"; break; case 5: sClr = "White"; break; case 6: sClr = "Black"; break; case 7: sClr = "Orange"; break; } BallType = a_nType; MemberName = "Ball" + sClr; this.CenterRegPoint(); m_pntVel = new EPointF(0, 0); }
public Ball(int a_nType, PlayArea a_playArea) { Parent = a_playArea; m_playArea = a_playArea; string sClr = ""; switch (a_nType) { case 0: sClr = "Red"; break; case 1: sClr = "Green"; break; case 2: sClr = "Blue"; break; case 3: sClr = "Yellow"; break; case 4: sClr = "Purple"; break; case 5: sClr = "White"; break; case 6: sClr = "Black"; break; case 7: sClr = "Orange"; break; } BallType = a_nType; MemberName = "Ball"+sClr; this.CenterRegPoint(); m_pntVel = new EPointF(0,0); }
public LevelManager(PlayArea a_playArea) { m_playArea = a_playArea; }
public PathCalc(PlayArea a_playArea) { m_playArea = a_playArea; }