You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
458 B
23 lines
458 B
package entity |
|
|
|
import ( |
|
"code.rocketnine.space/tslocum/doctorlectro/asset" |
|
"code.rocketnine.space/tslocum/doctorlectro/component" |
|
"code.rocketnine.space/tslocum/gohan" |
|
) |
|
|
|
func NewBullet() gohan.Entity { |
|
bullet := gohan.NewEntity() |
|
|
|
bullet.AddComponent(&component.Position{}) |
|
|
|
bullet.AddComponent(&component.Velocity{}) |
|
|
|
bullet.AddComponent(&component.Bullet{}) |
|
|
|
bullet.AddComponent(&component.Sprite{ |
|
Image: asset.ImgBullet, |
|
}) |
|
|
|
return bullet |
|
}
|
|
|