Example #1
0
 /// <summary>
 /// This method is called after this building is created by a TerranBuildingConstructionJob.
 /// </summary>
 /// <param name="job">Reference to the job.</param>
 internal void OnAttachConstructionJob(TerranBuildingConstructionJob job)
 {
     if (job == null)
     {
         throw new ArgumentNullException("job");
     }
     this.constructionJob.Write(job);
 }
Example #2
0
        /// <summary>
        /// This method is called after this SCV is attached to a TerranBuildingConstructionJob.
        /// </summary>
        /// <param name="job">Reference to the job.</param>
        internal void OnAttachConstructionJob(TerranBuildingConstructionJob job)
        {
            if (job == null)
            {
                throw new ArgumentNullException("job");
            }
            if (this.constructionJob.Read() != null)
            {
                throw new InvalidOperationException("This SCV has already a construction job attached to it!");
            }

            this.constructionJob.Write(job);
        }