private void ActivateSingleHazard(string type, bool highBird = false) { HazardElement hazard = m_ObjPoolsDictionary[type].GetObject().GetComponent <HazardElement>(); if (hazard != null) { Vector3 startingPos = m_HazardsStartPos[type]; if (highBird) { startingPos.y *= HIGH_BIRD_MULTIPLIER_CONST; } hazard.Activate(startingPos, m_HazardsSpeed); m_ActiveHazardsDictionary[type].Add(hazard); } }
private void ReturnHazard(HazardElement hazard, string hazardType) { m_ObjPoolsDictionary[hazardType].ReturnObjectToThePool(hazard.gameObject); m_ActiveHazardsDictionary[hazardType].Remove(hazard); }