示例#1
0
 public FireControlComponentBase(IShipComponentBaseContainer container, ILevelActorComponentBaseContainer create)
 {
     skills         = new List <ISkillContainer>();
     skillcd        = new List <long>();
     skillInitList  = new List <UserData>();
     this.container = container;
     this.level     = create;
     lastframe      = DateTime.Now.Ticks;
 }
 public HealthShieldComponentBase(IShipComponentBaseContainer container, HealthShieldComponentBase clone)
 {
     _hp                    = clone._hp;
     _shieldval             = clone._shieldval;
     _maxshieldVal          = clone._maxshieldVal;
     _shieldrecoverVal      = clone._shieldrecoverVal;
     _addshieldrecoverVal   = clone._addshieldrecoverVal;
     recoveryinterval       = clone.recoveryinterval;
     reducerecoveryinterval = clone.reducerecoveryinterval;
     lastTime               = DateTime.Now.Ticks;
     level                  = clone.level;
     Actor                  = container;
 }
示例#3
0
 public void Dispose()
 {
     level     = null;
     container = null;
     skillInitList.Clear();
     skillInitList = null;
     foreach (var skillContainer in skills)
     {
         skillContainer.Dispose();
     }
     skills.Clear();
     skills = null;
     skillcd.Clear();
     skillcd = null;
 }
示例#4
0
        public FireControlComponentBase(IShipComponentBaseContainer container, FireControlComponentBase clone)
        {
            this.container     = container;
            this.skills        = new List <ISkillContainer>();
            skillcd            = new List <long>();
            this.skillInitList = new List <UserData>();
            this.level         = clone.level;

            foreach (var skillContainer in clone.skills)
            {
                if (skillContainer.Clone() is ISkillContainer weaponBase)
                {
                    this.skills.Add(weaponBase);
                    //Log.Trace("Clone: type:" + weaponBase.GetActorType() + " cd" + weaponBase.GetSkillCd());
                    this.skillcd.Add(0);
                }
            }
            lastframe = DateTime.Now.Ticks;
        }
示例#5
0
        public FireControlComponentBase(IShipComponentBaseContainer container, ILevelActorComponentBaseContainer create, List <Int32> weapons)
        {
            this.container = container;
            this.skills    = new List <ISkillContainer>();
            skillcd        = new List <long>();
            skillInitList  = new List <UserData>();
            this.level     = create;

            foreach (var weapon in weapons)
            {
                level.GetConfigComponentInternalBase().GetActorClone(weapon, out var actor);
                if (actor is ISkillContainer weaponBase)
                {
                    this.skills.Add(weaponBase);
                    this.skillcd.Add(0);
                }
            }
            lastframe = DateTime.Now.Ticks;
        }
 public ShipEnemyAiComponent(ShipEnemyAiComponent clone, IShipComponentBaseContainer container) : base(clone, container)
 {
     //container.GetPhysicalinternalBase().GetBody().Velocity = container.GetForward() * 10;
     this.level     = container.GetLevel();
     this.container = container;
 }
        public ShipEnemyAiComponent(ILevelActorComponentBaseContainer level, IShipComponentBaseContainer container) : base(container)
        {
            this.level = level;

            this.container = container;
        }