Kree Documentation
  • Welcome to Kree Java
  • Changelog
  • Getting Started
    • Installing Kree
    • Installing Kree using CLI
    • Get Help on Discord
  • Core Components
    • Game
    • Window
    • SceneManager
    • Input
    • Debug
    • Sprite
    • GameObject
    • Transform
    • Vector2
    • SpriteSheet
    • Animation
    • Audio
    • Random
  • GameObject components
    • Animator
    • BoxCollider
    • LookAtObject
    • Mesh Renderer
    • ParticleSystem
    • RigidBody
    • SpriteRenderer
    • PlayerMovement
    • Prefs
  • Kree User Interface
    • Text
    • TextInput
    • ProgressBar
    • Button
    • Panel
  • Code Snippets
    • Launcher
    • Creating Scene
    • Follow Mouse On Click
    • Animating GameObject
    • Implementing Particle System
    • Creating Custom Components
    • Playing Audio
  • Game Tutorials
  • Avoid the Enemy!
  • High score
Powered by GitBook
On this page

Was this helpful?

  1. Code Snippets

Implementing Particle System

public class SceneNameHere extends Scene {

    private GameObject particleSystem = new GameObject(this, "My Particle");

    public Scene(Game game) {
        super(game);
    }

    @Override
    public void Initialize() {
        particleSystem.getTransform().setPosition(new Vector2(32, 32));
        particleSystem.addComponent(new ParticleSystem(particleSystem, ParticleSystem.TYPE_CIRCULAR, 3, 16, 1, 2, 100, 32, Color.ORANGE));
    }

    @Override
    public void Update() {

    }

    @Override
    public void Render(Graphics g) {

    }

}
PreviousAnimating GameObjectNextCreating Custom Components

Last updated 4 years ago

Was this helpful?