示例#1
0
 public void StopEffect(NodeRemoveEvent e, EffectReadyNode effect, [JoinByTank] TankWithGearsNode tank)
 {
     tank.acceleratedGearsInstance.Instance.SetActive(false);
 }
示例#2
0
 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));
 }
示例#3
0
 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));
         }
     }
 }