Improve static bullets

This commit is contained in:
2022-07-19 13:15:13 +01:00
parent 54ba0fbedc
commit 0a7922ec5e
19 changed files with 287 additions and 134 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ data Bullet = Bullet
, _buTimer :: Int
, _buDamages :: [Damage]
}
data EnergyBall = IncBall | TeslaBall | ConcBall
data EnergyBallType = IncBall | TeslaBall | ConcBall
data BulletState = NormalBulletState
| DyingBulletState
| DelayedBullet Float
@@ -28,7 +28,7 @@ data BulletEffect
| BounceBullet
| PenetrateBullet
deriving (Eq,Ord,Show,Read,Enum,Bounded)
data BulletSpawn = BulBall EnergyBall | BulSpark
data BulletSpawn = BulBall EnergyBallType | BulSpark
data BulletTrajectory
= BasicBulletTrajectory
| BezierTrajectory Point2 Point2 Point2
+19
View File
@@ -0,0 +1,19 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.EnergyBall where
import Geometry.Data
import Color
import Dodge.Data.Damage.Type
import Control.Lens
data EnergyBall = EnergyBall
{ _ebVel :: Point2
, _ebColor :: Color
, _ebPos :: Point2
, _ebWidth :: Float
, _ebTimer :: Int
, _ebEff :: (DamageType,Int)
, _ebZ :: Float
, _ebRot :: Float
}
makeLenses ''EnergyBall
+14
View File
@@ -0,0 +1,14 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.PosEvent where
import Geometry.Data
import Control.Lens
data PosEventType = SparkSpawner
data PosEvent = PosEvent
{ _pvType :: PosEventType
, _pvTimer :: Int
, _pvPos :: Point2
}
makeLenses ''PosEvent