Example #1
0
 public virtual void hit(int decrementValue, Interaction.Cause cause)
 {
     damage -= decrementValue;
     System.Diagnostics.Trace.WriteLineIf(!isAI, String.Format("Hit: decrement {0}, damage: {1}, called from: {2}", decrementValue, damage, Environment.StackTrace));
     if (decrementValue == 0 || damage <= 0)
     {
         m_cause = cause;
     }
 }
Example #2
0
 public Projector(string name)
 {
     this.name = name;
     //If playing online, projector's ID will be set
     //by some other, external operation,
     //because it will be server-specific.
     //Weapons will set their own IDs.
     if (!Options.isPlayingOnline && !Options.isLoading && !(this is WeaponBase))
     {
         setID();
     }
     if (Options.isPlayingOnline)
     {
         queue      = new BinaryReader(stream = new MemoryStream());            //queued data to be processed
         dataLocker = new object();
     }
     m_rudderTurnRate = 3;
     m_cause          = Interaction.Cause.none;
 }