Exemple #1
0
        public virtual PlayerMobile GetOccupant(int index)
        {
            LeverPuzzleRegion region = m_Tiles[index];

            if (region?.Occupant?.Alive == true)
            {
                return((PlayerMobile)region.Occupant);
            }
            return(null);
        }
Exemple #2
0
        public virtual PlayerMobile GetOccupant(int index)
        {
            LeverPuzzleRegion region = (LeverPuzzleRegion)this.m_Tiles[index];

            if (region != null)
            {
                if (region.Occupant != null && region.Occupant.Alive)
                {
                    return((PlayerMobile)region.Occupant);
                }
            }
            return(null);
        }