예제 #1
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);
                }
            }
        }
예제 #2
0
        public void DrawGraffiti(CreateGraffitiEvent e, FirstGraffitiNode graffitiNode, [JoinByUser] SingleNode <SelfBattleUserComponent> self, [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;
                graffitiNode.Entity.AddComponent(new GraffitiDecalComponent(e.Position, e.Direction, e.Up));
                this.PlaySound(graffitiNode.graffitiSound.Sound, e.Position);
                if (graffitiNode.dynamicDecalProjector.Emmit)
                {
                    Renderer component = graffitiNode.graffitiInstance.GraffitiDecalObject.GetComponent <Renderer>();
                    graffitiNode.graffitiInstance.EmitRenderer = component;
                    bloomPostEffect.component.burningTargetBloom.targets.Add(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);
                }
            }
        }