Пример #1
0
        private void StartRailgunChargingByBaseEvent(BaseRailgunChargingShotEvent evt, RailgunChargingNode muzzle, TankActiveNode tank)
        {
            RailgunChargingWeaponComponent railgunChargingWeapon = muzzle.railgunChargingWeapon;
            GetInstanceFromPoolEvent       eventInstance         = new GetInstanceFromPoolEvent {
                Prefab          = muzzle.railgunChargingEffect.Prefab,
                AutoRecycleTime = railgunChargingWeapon.ChargingTime
            };

            base.ScheduleEvent(eventInstance, muzzle);
            Transform  instance   = eventInstance.Instance;
            GameObject gameObject = instance.gameObject;

            CustomRenderQueue.SetQueue(gameObject, 0xc4e);
            ParticleSystem component = gameObject.GetComponent <ParticleSystem>();

            component.main.startLifetime = railgunChargingWeapon.ChargingTime;
            component.emission.enabled   = true;
            UnityUtil.InheritAndEmplace(instance, muzzle.muzzlePoint.Current);
            gameObject.SetActive(true);
            base.CreateEntity("railgun_charging").AddComponent(new TankGroupComponent(tank.Entity));
        }
Пример #2
0
 public void PlayShotEffect(BaseRailgunChargingShotEvent evt, RailgunSoundEffectReadyNode weapon, [JoinByTank] TankActiveNode tank)
 {
     weapon.railgunShotEffect.AudioSurce.Play();
 }
Пример #3
0
 public void StartRailgunChargingAnimation(BaseRailgunChargingShotEvent evt, RailgunAnimationReadyNode weapon)
 {
     weapon.railgunAnimation.StartChargingAnimation();
 }