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)); }
public void StartRailgunCharging(SelfRailgunChargingShotEvent evt, RailgunChargingNode muzzle, [JoinBy(typeof(TankGroupComponent))] TankActiveNode tank) { this.StartRailgunChargingByBaseEvent(evt, muzzle, tank); }