コード例 #1
0
ファイル: Splatter.cs プロジェクト: NarPar/OrcaJam2013
 public void CreateDeathSplatter(Vector2 pos, float rotation)
 {
     base.position = pos;
     base.rotation = rotation;
     alpha = 0.0f;
     timer = 0.0f;
     state = SplatterState.In;
 }
コード例 #2
0
ファイル: Splatter.cs プロジェクト: gedig/OrcaJam2013
 private void HandleIdle(GameTime gameTime)
 {
     timer += (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (timer >= IDLE_TIME)
     {
         state = SplatterState.Out;
     }
 }
コード例 #3
0
ファイル: Splatter.cs プロジェクト: gedig/OrcaJam2013
 public void CreateDeathSplatter(Vector2 pos, float rotation)
 {
     base.Position = pos;
     base.Rotation = rotation;
     Alpha         = 0.0f;
     timer         = 0.0f;
     state         = SplatterState.In;
 }
コード例 #4
0
ファイル: Splatter.cs プロジェクト: NarPar/OrcaJam2013
        public Splatter(Texture2D sprite, float s)
            : base(sprite)
        {
            scale = new Vector2(s);

            state = SplatterState.Done;

            alpha = 0.0f;
        }
コード例 #5
0
ファイル: Splatter.cs プロジェクト: gedig/OrcaJam2013
 private void AnimateOut(GameTime gameTime)
 {
     Alpha -= (1.0f / OUT_TIME) * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (Alpha <= 0.0f)
     {
         Alpha = 0.0f;
         state = SplatterState.Done;
     }
 }
コード例 #6
0
ファイル: Splatter.cs プロジェクト: gedig/OrcaJam2013
 private void AnimateIn(GameTime gameTime)
 {
     Alpha += (1.0f / IN_TIME) * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (Alpha >= 1.0f)
     {
         Alpha = 1.0f;
         state = SplatterState.Idle;
     }
 }
コード例 #7
0
ファイル: Splatter.cs プロジェクト: gedig/OrcaJam2013
        public Splatter(Texture2D sprite, float s)
            : base(sprite)
        {
            Scale = new Vector2(s);

            state = SplatterState.Done;

            Alpha = 0.0f;
        }
コード例 #8
0
ファイル: Splatter.cs プロジェクト: NarPar/OrcaJam2013
 private void AnimateOut(GameTime gameTime)
 {
     alpha -= (1.0f / OUT_TIME) * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (alpha <= 0.0f)
     {
         alpha = 0.0f;
         state = SplatterState.Done;
     }
 }
コード例 #9
0
ファイル: Splatter.cs プロジェクト: NarPar/OrcaJam2013
 private void AnimateIn(GameTime gameTime)
 {
     alpha += (1.0f / IN_TIME) * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (alpha >= 1.0f)
     {
         alpha = 1.0f;
         state = SplatterState.Idle;
     }
 }
コード例 #10
0
ファイル: Splatter.cs プロジェクト: NarPar/OrcaJam2013
 private void HandleIdle(GameTime gameTime)
 {
     timer += (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (timer >= IDLE_TIME)
     {
         state = SplatterState.Out;
     }
 }