Example #1
0
        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);
            }
        }
Example #2
0
 private void ReturnHazard(HazardElement hazard, string hazardType)
 {
     m_ObjPoolsDictionary[hazardType].ReturnObjectToThePool(hazard.gameObject);
     m_ActiveHazardsDictionary[hazardType].Remove(hazard);
 }