public FireControlAbilityDB(FireControlAbilityDB toClone)
 {
     FireControlComponents = new List <Entity>(toClone.FireControlComponents);
     FireControlInsances   = new List <FireControlInstanceStateDB>(toClone.FireControlInsances);
     WeaponComponents      = new List <Entity>(toClone.WeaponComponents);
     WeaponInstanceStates  = new List <WeaponInstanceStateDB>(toClone.WeaponInstanceStates);
 }
Example #2
0
        public void OnComponentInstallation(Entity parentEntity, ComponentInstance componentInstance)
        {
            var instancesDB = parentEntity.GetDataBlob <ComponentInstancesDB>();

            if (!parentEntity.HasDataBlob <FireControlAbilityDB>())
            {
                var fcdb = new FireControlAbilityDB();
                parentEntity.SetDataBlob(fcdb);
            }

            if (!componentInstance.HasAblity <WeaponState>())
            {
                componentInstance.SetAbilityState <WeaponState>(new WeaponState());
            }
        }
Example #3
0
        public void OnComponentInstalation(Entity parentEntity, Entity componentInstance)
        {
            if (!parentEntity.HasDataBlob <FireControlAbilityDB>())
            {
                var fcdb = new FireControlAbilityDB();
                parentEntity.SetDataBlob(fcdb);
            }
            var ability = parentEntity.GetDataBlob <FireControlAbilityDB>();

            if (!componentInstance.HasDataBlob <WeaponInstanceStateDB>())
            {
                componentInstance.SetDataBlob(new WeaponInstanceStateDB());
            }
            ability.AddWeaponToParentEntity(componentInstance);
        }
Example #4
0
        public void OnComponentInstallation(Entity parentEntity, ComponentInstance componentInstance)
        {
            var instancesDB = parentEntity.GetDataBlob <ComponentInstancesDB>();

            if (!parentEntity.HasDataBlob <FireControlAbilityDB>())
            {
                var fcdb = new FireControlAbilityDB();
                parentEntity.SetDataBlob(fcdb);
            }

            if (!componentInstance.HasAblity <WeaponState>())
            {
                var wpnState = new WeaponState(componentInstance, this);
                wpnState.WeaponType     = "Beam";
                wpnState.WeaponStats    = new (string name, double value, ValueTypeStruct valueType)[3];
Example #5
0
 FireControlAbilityDB(FireControlAbilityDB db)
 {
 }