Пример #1
0
        private BeamType GetWreckBeamType()
        {
            var robot      = _unit as Robot;
            var definition = robot?.GetRobotComponent(RobotComponentType.Leg).Definition ?? _unit.Definition;

            return(BeamHelper.GetBeamByDefinition(definition));
        }
Пример #2
0
        public void CreateSuccessBeam(Player player)
        {
            //success beam by alarm switch definition
            var builder = Beam.NewBuilder().WithType(BeamHelper.GetBeamByDefinition(Definition))
                          .WithPosition(CurrentPosition)
                          .WithState(BeamState.AlignToTerrain)
                          .WithDuration(TimeSpan.FromSeconds(3));

            if (IsBeamPublic())
            {
                //mindenki latja
                Zone.CreateBeam(builder);
            }
            else
            {
                //csak 1 player latja
                player.Session.SendBeam(builder);
            }
        }
        private BeamType GetBeamType()
        {
            var ammo = GetAmmo();

            return(ammo != null?BeamHelper.GetBeamByDefinition(ammo.Definition) : BeamHelper.GetBeamByDefinition(Definition));
        }