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(); } }
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); } }