Esempio n. 1
0
 public void CreateDeathSplatter(Vector2 pos, float rotation)
 {
     base.position = pos;
     base.rotation = rotation;
     alpha = 0.0f;
     timer = 0.0f;
     state = SplatterState.In;
 }
Esempio n. 2
0
 private void HandleIdle(GameTime gameTime)
 {
     timer += (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (timer >= IDLE_TIME)
     {
         state = SplatterState.Out;
     }
 }
Esempio n. 3
0
 public void CreateDeathSplatter(Vector2 pos, float rotation)
 {
     base.Position = pos;
     base.Rotation = rotation;
     Alpha         = 0.0f;
     timer         = 0.0f;
     state         = SplatterState.In;
 }
Esempio n. 4
0
        public Splatter(Texture2D sprite, float s)
            : base(sprite)
        {
            scale = new Vector2(s);

            state = SplatterState.Done;

            alpha = 0.0f;
        }
Esempio n. 5
0
 private void AnimateOut(GameTime gameTime)
 {
     Alpha -= (1.0f / OUT_TIME) * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (Alpha <= 0.0f)
     {
         Alpha = 0.0f;
         state = SplatterState.Done;
     }
 }
Esempio n. 6
0
 private void AnimateIn(GameTime gameTime)
 {
     Alpha += (1.0f / IN_TIME) * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (Alpha >= 1.0f)
     {
         Alpha = 1.0f;
         state = SplatterState.Idle;
     }
 }
Esempio n. 7
0
        public Splatter(Texture2D sprite, float s)
            : base(sprite)
        {
            Scale = new Vector2(s);

            state = SplatterState.Done;

            Alpha = 0.0f;
        }
Esempio n. 8
0
 private void AnimateOut(GameTime gameTime)
 {
     alpha -= (1.0f / OUT_TIME) * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (alpha <= 0.0f)
     {
         alpha = 0.0f;
         state = SplatterState.Done;
     }
 }
Esempio n. 9
0
 private void AnimateIn(GameTime gameTime)
 {
     alpha += (1.0f / IN_TIME) * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (alpha >= 1.0f)
     {
         alpha = 1.0f;
         state = SplatterState.Idle;
     }
 }
Esempio n. 10
0
 private void HandleIdle(GameTime gameTime)
 {
     timer += (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (timer >= IDLE_TIME)
     {
         state = SplatterState.Out;
     }
 }