OpenRA.Mods.Common.Effects.Beacon.Beacon C# (CSharp) Method

Beacon() public method

public Beacon ( Player owner, WPos position, bool isPlayerPalette, string palette, string posterCollection, string posterType, string posterPalette, string arrowSequence, string circleSequence, string clockSequence, Func clockFraction ) : System
owner Player
position WPos
isPlayerPalette bool
palette string
posterCollection string
posterType string
posterPalette string
arrowSequence string
circleSequence string
clockSequence string
clockFraction Func
return System
        public Beacon(Player owner, WPos position, bool isPlayerPalette, string palette, string posterCollection, string posterType, string posterPalette,
			string arrowSequence, string circleSequence, string clockSequence, Func<float> clockFraction)
            : this(owner, position, -1, palette, isPlayerPalette, posterCollection, arrowSequence, circleSequence)
        {
            this.posterPalette = posterPalette;

            if (posterType != null)
            {
                poster = new Animation(owner.World, posterCollection);
                poster.Play(posterType);

                if (clockFraction != null)
                {
                    clock = new Animation(owner.World, posterCollection);
                    clock.PlayFetchIndex(clockSequence, () => Exts.Clamp((int)(clockFraction() * (clock.CurrentSequence.Length - 1)), 0, clock.CurrentSequence.Length - 1));
                }
            }
        }

Same methods

Beacon::Beacon ( Player owner, WPos position, int duration, string beaconPalette, bool isPlayerPalette, string beaconCollection, string arrowSprite, string circleSprite ) : System