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

            if (heroExtraByUserId != null)
            {
                heroExtraByUserId.TimeToRelive = null;
            }
        }
Esempio 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);
            }
        }
Esempio n. 3
0
        public float?GetReliveRatio(int heroUniqueId)
        {
            HeroExtraInRoom heroExtraByUserId = this._roomInfo.GetHeroExtraByUserId(-heroUniqueId);

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