]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/Trigger.cs
Implemented map tiles; started new Key entity; added missing variables to Melee.cs...
[chaz/carfire] / CarFire / CarFire / CarFire / Trigger.cs
index 25cc11efa1ff0ead9f574de5231166729f1ac0a0..6d639d8f343e0c80b14f504199296cc424ec492e 100644 (file)
@@ -17,6 +17,13 @@ namespace CarFire
     {\r
         #region Public Methods\r
 \r
+        /// <summary>\r
+        /// Construct a trigger entity.\r
+        /// </summary>\r
+        /// <param name="identifier">The entity identifier.</param>\r
+        /// <param name="position">The position.</param>\r
+        /// <param name="info">The key-value pairs.</param>\r
+        /// <param name="game">The game reference.</param>\r
         public Trigger(char identifier, Point position, Dictionary<string, string> info, Game game)\r
         {\r
             mGame = game;\r
@@ -38,7 +45,11 @@ namespace CarFire
             else throw new Exception("Triggers must define an event script.");\r
         }\r
 \r
-        public void Update(TimeSpan timeSpan)\r
+        /// <summary>\r
+        /// Check the trigger condition and execute the event if the\r
+        /// condition evaluates to true.\r
+        /// </summary>\r
+        public void Call()\r
         {\r
             Player player = mGame.GetPlayerAtCoordinates(mCoordinates);\r
             if (player != null)\r
@@ -56,12 +67,22 @@ namespace CarFire
             }\r
         }\r
 \r
-        public void LoadContent(ContentManager contentManager)\r
+\r
+        /// <summary>\r
+        /// Calls the trigger.\r
+        /// </summary>\r
+        /// <param name="timeSpan">Unused.</param>\r
+        public virtual void Update(TimeSpan timeSpan)\r
+        {\r
+            Call();\r
+        }\r
+\r
+        public virtual void LoadContent(ContentManager contentManager)\r
         {\r
             // No implementation needed.\r
         }\r
 \r
-        public void Draw(SpriteBatch spriteBatch)\r
+        public virtual void Draw(SpriteBatch spriteBatch)\r
         {\r
             // No implementation needed.\r
         }\r
This page took 0.0198 seconds and 4 git commands to generate.