コード例 #1
0
ファイル: PlayerObject.cs プロジェクト: proxeeus/Spawn
        private void Reset()
        {
            if (IsPoisoned)
            {
                IsPoisoned = false;
            }
            if (IsYellowHits)
            {
                IsYellowHits = false;
            }
            if (IsParalyzed)
            {
                IsParalyzed = false;
            }
            if (IsDead)
            {
                IsDead = false;
            }
            if (IsHidden)
            {
                IsHidden = false;
            }

            if (Hits.Min != 0 || Hits.Max != 0)
            {
                Hits.Reset();
            }
            if (Mana.Min != 0 || Mana.Max != 0)
            {
                Mana.Reset();
            }
            if (Stamina.Min != 0 || Stamina.Max != 0)
            {
                Stamina.Reset();
            }

            if (Map != Global.FirstValidFacet)
            {
                Map = (byte)Global.FirstValidFacet;
            }
            if (Position.X != 0 || Position.Y != 0)
            {
                UpdatePosition(0, 0);
            }
        }