Beispiel #1
0
 public Barrel(Vector2 position)
     : base(GameDevGame.Current)
 {
     m_CurrentPosition = Vector2.Zero;
     m_StartPosition   = position;
     Initialize();
     for (int i = 0; i < NumberOfStaves; i++)
     {
         m_PhysicalStaves[i] = new PhysicalStaff();
     }
 }
Beispiel #2
0
        public bool CheckHit(PossibleColors color)
        {
            PhysicalStaff staffToHit = m_PhysicalStaves[m_VisualStaves[0].PhysicalStaffIndex];

            if (staffToHit.Destroyed)
            {
                return(false);
            }
            else
            {
                Sound.Sounds.PlayToendeRamt();
                if (staffToHit.Color == color)
                {
                    staffToHit.Destroyed = true;
                    return(true);
                }
                return(false);
            }
        }