コード例 #1
0
ファイル: Overlay.cs プロジェクト: fordream/Sunfish
 public void Disappear()
 {
     Effects.Disappear disappearEffect = new Effects.Disappear (500);
     disappearEffect.OnComplete = HandleDisappearEffectOnComplete;
     StartEffect (disappearEffect);
 }
コード例 #2
0
ファイル: ParticleSystem.cs プロジェクト: fordream/Sunfish
            public Particle(Texture2D particleTexture, Vector2 position, Constants.ViewLayer layer, Vector2 velocity, Vector2 acceleration, double lifeSpan, bool shouldShrink)
                : base(particleTexture, position, layer)
            {
                //CenterOrigin ();
                Velocity = velocity;
                Acceleration = acceleration;
                //StartEffect (new Effects.Motion (velocity, acceleration, lifeSpan));

                DisappearEffect = new Effects.Disappear (lifeSpan);
                DisappearEffect.OnComplete = HandleDisappear;
                StartEffect (DisappearEffect);

                ScaleEffect = new Effects.Scale (1f, 0f, lifeSpan);
                if (shouldShrink) {
                    StartEffect (ScaleEffect);
                }
            }