private void _Deactivate()
        {
            IsActive = false;

            IsSelected = false;
            SpawnVersion++;
            if (onDeactivation.IsNotNull())
            {
                onDeactivation(this);
            }

            abilityManager.Deactivate();

            Body.Deactivate();
            if (Influencer.IsNotNull())
            {
                Influencer.Deactivate();
            }

            if (StatsBarer != null)
            {
                StatsBarer.Deactivate();
            }
            if (Ringer.IsNotNull())
            {
                Ringer.Deactivate();
            }
        }
        public Ringer Map(WrestlerApiModel apiModel)
        {
            Ringer result = new Ringer
            {
                Vorname            = apiModel.Givenname,
                Nachname           = apiModel.Name,
                Status             = apiModel.AuthRating,
                Startausweisnummer = apiModel.PassCode,
                Lizenznummer       = apiModel.LicenceCode?.ToString(),
                Geburtsdatum       = DateTime.Parse(apiModel.Birthday),
                Vereinsnummer      = apiModel.ClubCode,
            };

            switch (apiModel.Gender.ToUpper())
            {
            case "M":
                result.Geschlecht = Geschlecht.Maennlich;
                break;

            case "W":
                result.Geschlecht = Geschlecht.Weiblich;
                break;

            default:
                throw new ArgumentException($"Geschlecht {apiModel.Gender} konnte nicht ermittelt werden");
            }

            return(result);
        }
        public void Pass_113581_erwarte_korrekte_Daten()
        {
            Ringer ringer = _apiStammdaten.Get_Ringer_Async("11358").Result;

            ringer.Vorname.Should().Be("Matin"); //In Testdatenbank anonymisiert (Immer erster Buchstabe des Vornamens mit .)
            ringer.Nachname.Should().Be("Sakhi");
        }
 static AvPlayer()
 {
     state         = AvChatStateE.Idle;
     ChatType      = AvChatTypeE.Audio;
     initiatedChat = false;
     ringer        = new Ringer();
     ringer.Initialize();
 }
        public async Task <RingerViewModel> Get_und_Map_Ringer_Async(string startausweisNr)
        {
            Ringer ringer = await _apiStammdaten.Get_Ringer_Async(startausweisNr);

            var ringerViewModel = _viewModelMapper.Map(ringer);

            return(ringerViewModel);
        }
        public void Initialize(
            AgentController controller,
            ushort localID,
            ushort globalID,
            Vector2d position = default(Vector2d),
            Vector2d rotation = default(Vector2d))
        {
            LocalID    = localID;
            GlobalID   = globalID;
            Controller = controller;

            IsActive     = true;
            CheckCasting = true;
            Selectable   = true;


            CachedGameObject.SetActiveIfNot(true);
            if (Body.IsNotNull())
            {
                Body.Initialize(new Vector2dHeight(position), rotation);
            }

            if (Triggers.IsNotNull())
            {
                foreach (LSTrigger trigger in Triggers)
                {
                    trigger.Initialize();
                }
            }

            if (Influencer.IsNotNull())
            {
                Influencer.Initialize();
            }

            if (Animator.IsNotNull())
            {
                Animator.Initialize();
            }

            abilityManager.Initialize();
            if (StatsBarer != null)
            {
                StatsBarer.Initialize();
            }
            if (Ringer.IsNotNull())
            {
                Ringer.Initialize();
                IsSelected    = false;
                IsHighlighted = false;
            }
            if (onInitialized != null)
            {
                onInitialized(this);
            }
        }
Exemple #7
0
        private void Form1_Load(object sender, EventArgs e)
        {
            ringer     = new Ringer(this);
            countdown  = new Countdown();
            bWantClose = false;

            // > 24bpp fix
            Bitmap b = (Bitmap)BackgroundImage;

            TransparencyKey = b.GetPixel(1, 1);
            TransparencyFix.FixTranparency((Form)this);
        }
        public void Pass_1_erwarte_korrekte_Daten()
        {
            Ringer ringer = _apiStammdaten.Get_Ringer_Async("1").Result;

            ringer.Vorname.Should().Be("Aziz");
            ringer.Nachname.Should().Be("Kiamars");
            ringer.Geburtsdatum.Should().Be(new DateTime(1973, 02, 09));
            ringer.Geschlecht.Should().Be(Geschlecht.Maennlich);
            ringer.Vereinsnummer.Should().Be("100037");
            ringer.Status.Should().Be("");
            ringer.Startausweisnummer.Should().Be("1");
            ringer.Lizenznummer.Should().BeNull();
        }
        public void Setup(IAgentData interfacer)
        {
            gameObject.SetActive(true);
            LoadComponents();

            GameObject.DontDestroyOnLoad(gameObject);

            setupAbilitys.FastClear();

            MyAgentCode  = interfacer.Name;
            Data         = interfacer;
            SpawnVersion = 1;
            CheckCasting = true;

            Influencer = new LSInfluencer();
            if (_visualCenter == null)
            {
                _visualCenter = CachedTransform;
            }

            if (Animator.IsNotNull())
            {
                Animator.Setup();
            }


            abilityManager.Setup(this);
            Ringer = RingController.Create();
            if (Ringer.IsNotNull())
            {
                Ringer.Setup(this);
            }

            Influencer.Setup(this);
            Body.Setup(this);

            SelectionRadiusSquared = _selectionRadius * _selectionRadius;
            if (StatsBarer != null)
            {
                StatsBarer.Setup(this);
            }

            this.RegisterLockstep();
        }
Exemple #10
0
        public void Initialize(
            AgentController controller,
            ushort localID,
            ushort globalID,
            Vector2d position = default(Vector2d))
        {
            LocalID    = localID;
            GlobalID   = globalID;
            Controller = controller;

            IsActive     = true;
            CheckCasting = true;
            Selectable   = true;


            CachedGameObject.SetActive(true);
            if (Body.IsNotNull())
            {
                Body.Initialize(position, Vector2d.up);
            }

            if (Influencer.IsNotNull())
            {
                Influencer.Initialize();
            }

            if (Animator.IsNotNull())
            {
                Animator.Initialize();
            }

            abilityManager.Initialize();
            if (StatsBarer != null)
            {
                StatsBarer.Initialize();
            }
            if (Ringer.IsNotNull())
            {
                Ringer.Initialize();
                IsSelected    = false;
                IsHighlighted = false;
            }
        }
        public void Call_erwarte_Erfolg()
        {
            Ringer ringer = _apiStammdaten.Get_Ringer_Async("1").Result;

            ringer.Should().NotBeNull();
        }
 public RingerViewModel Map(Ringer ringer)
 {
     return(new RingerViewModel(ringer.Vorname, ringer.Nachname, ringer.Status, ringer.Startausweisnummer, ringer.Geburtsdatum));
 }