Esempio n. 1
0
		/// <summary>
		/// Initializes doors
		/// </summary>
		/// <param name="square">Parent square handle</param>
		public Door(Square square) : base(square)
		{
			// Zone of the button to open/close the door
			Button = new Rectangle(252, 90, 20, 28);

			Count = new SwitchCount();

			// Sounds
			OpenSound = ResourceManager.LockSharedAsset<AudioSample>("door open");
			CloseSound = ResourceManager.LockSharedAsset<AudioSample>("door close");


			AcceptItems = false;
			Speed = TimeSpan.FromSeconds(1);

			if (Square != null || Square.Maze != null)
				Type = Square.Maze.DefaultDoorType;

			//IsActivated = IsOpen;
		}
Esempio n. 2
0
        /// <summary>
        /// Initializes doors
        /// </summary>
        /// <param name="square">Parent square handle</param>
        public Door(Square square) : base(square)
        {
            // Zone of the button to open/close the door
            Button = new Rectangle(252, 90, 20, 28);

            Count = new SwitchCount();

            // Sounds
            OpenSound  = ResourceManager.LockSharedAsset <AudioSample>("door open");
            CloseSound = ResourceManager.LockSharedAsset <AudioSample>("door close");


            AcceptItems = false;
            Speed       = TimeSpan.FromSeconds(1);

            if (Square != null || Square.Maze != null)
            {
                Type = Square.Maze.DefaultDoorType;
            }

            //IsActivated = IsOpen;
        }