Example #1
0
        public MobileUnit(SerializationInfo info, StreamingContext ctx) : base(info, ctx)
        {
            try {
                m_aggr = (Aggressiveness)info.GetInt32("Aggressiveness");
            } catch (SerializationException) {
                m_aggr = Aggressiveness.Defender;
            }

            try {
                m_cab = (CaBase)info.GetValue("Action", typeof(CaBase));
            } catch (SerializationException) {
                m_cab = new GuardUnitAction();
            }
            Init();
        }
Example #2
0
 public MobileUnit(Side side, int tx, int ty) : base(side, tx, ty)
 {
     m_aggr = Aggressiveness.Defender;
     m_cab  = new GuardUnitAction();
 }