Пример #1
0
        /// <summary>
        /// Fires the one shot.
        /// </summary>
        /// <param name="_target">Target.</param>
        public void FireOneShot(Transform _target)
        {
            if (Ammunition.Enabled)
            {
                Ammunition.Fire(_target);
            }

            if (Recoil.Enabled)
            {
                Recoil.Start();
            }

            if (LaunchSound.Enabled)
            {
                LaunchSound.Play();
            }

            if (MuzzleFlash.Enabled)
            {
                MuzzleFlash.Start();
            }

            if (Shell.Enabled)
            {
                Shell.Start();
            }

            if (Effect.Enabled)
            {
                Effect.Start(OwnerComponent);
            }
        }
Пример #2
0
        public override void Init(ICEWorldBehaviour _component)
        {
            base.Init(_component);

            LaunchSound.Init(_component);
            Ammunition.Init(_component);
            MuzzleFlash.Init(_component);
            Recoil.Init(_component);
            Effect.Init(_component);
        }
Пример #3
0
        public DroneBaySerializable Serialize()
        {
            var serializable = new DroneBaySerializable();

            serializable.Id                       = ItemId.Id;
            serializable.FileName                 = ItemId.Name;
            serializable.ItemType                 = (int)ItemType.DroneBay;
            serializable.EnergyConsumption        = EnergyConsumption.Value;
            serializable.PassiveEnergyConsumption = PassiveEnergyConsumption.Value;
            serializable.Range                    = Range.Value;
            serializable.DamageMultiplier         = DamageMultiplier.Value;
            serializable.DefenseMultiplier        = DefenseMultiplier.Value;
            serializable.SpeedMultiplier          = SpeedMultiplier.Value;
            serializable.ImprovedAi               = ImprovedAi;
            serializable.Capacity                 = Capacity.Value;
            serializable.ActivationType           = ActivationType;
            serializable.LaunchSound              = LaunchSound.ToString();
            serializable.LaunchEffectPrefab       = LaunchEffectPrefab;
            serializable.ControlButtonIcon        = ControlButtonIcon;
            return(serializable);
        }