Esempio n. 1
0
        /// <summary>
        /// Flash the color of the zone and gradually fade back to normal
        /// </summary>
        /// <param name="z"></param>
        /// <returns></returns>
        public override SKColor RecolorZone(Zone z)
        {
            // Determine base color for zone
            var color = base.RecolorZone(z);

            // If it's part of the reinforcements list, lerp its color
            if (Reinforcements.ContainsKey(z))
            {
                return(GameViewController.Lighten(color, (1.0f - _lerp)));
            }
            return(color);
        }
Esempio n. 2
0
        public override SKColor RecolorZone(Zone z)
        {
            var color = base.RecolorZone(z);

            if (z == _attacker)
            {
                return(GameViewController.Lighten(color, (1.0f - _lerp) * 0.5f));
            }
            if (z == _defender)
            {
                return(GameViewController.Lighten(color, (1.0f - _lerp) * 0.5f));
            }
            return(color);
        }