Example #1
0
        void ProjectileContact(Projectile lhs, Projectile rhs)
        {
            if (lhs == null)
            {
                throw new ArgumentNullException("lhs");
            }
            if (rhs == null)
            {
                throw new ArgumentNullException("rhs");
            }

            if (lhs.Priority == rhs.Priority)
            {
                lhs.StartCanceling();
                rhs.StartCanceling();
            }
            else if (lhs.Priority > rhs.Priority)
            {
                --lhs.Priority;
                rhs.StartCanceling();
            }
            else if (lhs.Priority < rhs.Priority)
            {
                lhs.StartCanceling();
                --rhs.Priority;
            }
        }
Example #2
0
		void ProjectileContact(Projectile lhs, Projectile rhs)
		{
			if (lhs == null) throw new ArgumentNullException("lhs");
			if (rhs == null) throw new ArgumentNullException("rhs");

			if (lhs.Priority == rhs.Priority)
			{
				lhs.StartCanceling();
				rhs.StartCanceling();
			}
			else if (lhs.Priority > rhs.Priority)
			{
				--lhs.Priority;
				rhs.StartCanceling();
			}
			else if (lhs.Priority < rhs.Priority)
			{
				lhs.StartCanceling();
				--rhs.Priority;
			}
		}