Example #1
0
        public void Execute()
        {
            var obj = new HazType { X = 1, Type = typeof(string), AnotherType = typeof(ProtoReader) };

            var clone = Serializer.DeepClone(obj);

            Assert.AreEqual(1, clone.X);
            Assert.AreEqual(typeof(string), clone.Type);
            Assert.AreEqual(typeof(ProtoReader), clone.AnotherType);
        }
Example #2
0
        public void Execute()
        {
            var obj = new HazType {
                X = 1, Type = typeof(string), AnotherType = typeof(ProtoReader)
            };

            var clone = Serializer.DeepClone(obj);

            Assert.AreEqual(1, clone.X);
            Assert.AreEqual(typeof(string), clone.Type);
            Assert.AreEqual(typeof(ProtoReader), clone.AnotherType);
        }
Example #3
0
 /// <summary>
 /// Listener function that updates the number of hazards completed and updates the ObjectivesListUI.
 /// </summary>
 /// <param name="completed">The new completion status of the hazard.</param>
 /// <param name="hazType">What type of hazard raised the event.</param>
 public void HazardCompleted(bool completed, HazType hazType)
 {
     if (completed)
     {
         totalHazardCompleted++;
     }
     else
     {
         totalHazardCompleted--;
     }
     objectiveList.UpdateCompletedCount(completed, (int)hazType);
 }