Ejemplo n.º 1
0
 public void CheckSpraySelf(TimeUpdateEvent e, GraffitiSimpleNode graffiti, [JoinByUser] SingleNode <SelfBattleUserComponent> self, [JoinByUser] SingleNode <TankActiveStateComponent> tank, [JoinByBattle] SingleNode <RoundActiveStateComponent> round)
 {
     if (InputManager.GetActionKeyDown(BattleActions.GRAFFITI) && (graffiti.graffitiAntiSpamTimer.SprayDelay < Time.realtimeSinceStartup))
     {
         base.ScheduleEvent <SprayEvent>(graffiti);
         graffiti.graffitiAntiSpamTimer.SprayDelay = Time.realtimeSinceStartup + 5.1f;
     }
 }
Ejemplo n.º 2
0
 private void AddEmitEffect(GraffitiSimpleNode graffiti, BurningTargetBloomComponent effect)
 {
     if (graffiti.dynamicDecalProjector.Emmit)
     {
         Renderer component = graffiti.graffitiInstance.GraffitiDecalObject.GetComponent <Renderer>();
         graffiti.graffitiInstance.EmitRenderer = component;
         effect.burningTargetBloom.targets.Add(component);
     }
 }
Ejemplo n.º 3
0
        public void DrawGraffiti(CreateGraffitiEvent e, GraffitiSimpleNode graffitiNode, [JoinByUser] RemoteUserNode user, [JoinByUser] TankWithGraffitiNode tank, [JoinByUser] Optional <SingleNode <PremiumAccountBoostComponent> > premium, [JoinAll] SingleNode <DecalManagerComponent> decalManagerNode, [JoinAll] SingleNode <BurningTargetBloomComponent> bloomPostEffect)
        {
            GameObject obj2 = this.DrawGraffiti(decalManagerNode.component, graffitiNode.dynamicDecalProjector, e.Position, e.Direction, e.Up);

            if (obj2)
            {
                graffitiNode.graffitiInstance.GraffitiDecalObject = obj2;
                this.PlaySound(graffitiNode.graffitiSound.Sound, e.Position);
                this.AddEmitEffect(graffitiNode, bloomPostEffect.component);
                if (premium.IsPresent())
                {
                    GraffitiVisualEffectComponent graffitiVisualEffect = tank.graffitiVisualEffect;
                    GraffitiVisualEffect          visualEffectPrefab   = graffitiVisualEffect.VisualEffectPrefab;
                    this.DrawEffect(visualEffectPrefab, graffitiVisualEffect.TimeToDestroy, tank.tankCommonInstance.TankCommonInstance.transform, graffitiNode.imageItem.SpriteUid, graffitiNode.itemRarity.RarityType);
                }
            }
        }