public void StopEffect(NodeRemoveEvent e, EffectReadyNode effect, [JoinByTank] TankWithGearsNode tank) { tank.acceleratedGearsInstance.Instance.SetActive(false); }
public void UpdateEffect(TimeUpdateEvent e, TankWithGearsNode tank, [JoinByTank] WeaponNode weapon, [JoinByTank] EffectReadyNode effect) { tank.acceleratedGearsInstance.Instance.SetActive((weapon.weaponRotationControl.Speed > weapon.weaponRotation.BaseSpeed) && (weapon.weaponRotationControl.EffectiveControl != 0f)); }
public void Instantiate(NodeAddedEvent e, SingleNode <PreloadedModuleEffectsComponent> mapEffect, [Combine] EffectReadyNode effect, [JoinByTank, Context] TankNode tank) { if (!tank.Entity.HasComponent <AcceleratedGearsInstanceComponent>()) { GameObject original = mapEffect.component.PreloadedEffects["acceleratedgears"]; if (original) { GameObject instance = Object.Instantiate <GameObject>(original); instance.SetActive(true); instance.transform.SetParent(tank.mountPoint.MountPoint, false); instance.transform.localPosition = Vector3.zero; tank.Entity.AddComponent(new AcceleratedGearsInstanceComponent(instance)); } } }