Ejemplo n.º 1
0
        public static void On_ReliveHero(int heroId)
        {
            HeroExtraInRoom heroExtraByUserId = Singleton <PvpManager> .Instance._roomInfo.GetHeroExtraByUserId(-heroId);

            if (heroExtraByUserId != null)
            {
                heroExtraByUserId.TimeToRelive = null;
            }
        }
Ejemplo n.º 2
0
        public static void On_KillHero(int deadId, float passedSeconds, float maxReliveSeconds)
        {
            HeroExtraInRoom heroExtraByUserId = Singleton <PvpManager> .Instance._roomInfo.GetHeroExtraByUserId(-deadId);

            if (heroExtraByUserId != null)
            {
                heroExtraByUserId.TimeToRelive   = new DateTime?(DateTime.Now + TimeSpan.FromSeconds((double)(maxReliveSeconds - passedSeconds)));
                heroExtraByUserId.ReliveInterval = TimeSpan.FromSeconds((double)maxReliveSeconds);
            }
        }
Ejemplo n.º 3
0
        public float?GetReliveRatio(int heroUniqueId)
        {
            HeroExtraInRoom heroExtraByUserId = this._roomInfo.GetHeroExtraByUserId(-heroUniqueId);

            if (heroExtraByUserId != null)
            {
                return(heroExtraByUserId.ReliveRatio);
            }
            return(null);
        }