Search Results for

    Show / Hide Table of Contents

    Class AmoebotSimulator

    The main class of the entire simulator. Manages the particle system and the render system and provides the high-level interface for controlling the simulation. This class triggers the main render call in each frame and the round simulation in each fixed update.

    Inheritance
    object
    AmoebotSimulator
    Namespace: AS2
    Assembly: .dll
    Syntax
    public class AmoebotSimulator : MonoBehaviour

    Constructors

    | Edit this page View Source

    AmoebotSimulator()

    Declaration
    public AmoebotSimulator()

    Fields

    | Edit this page View Source

    instance

    The singleton instance of the class.

    Declaration
    public static AmoebotSimulator instance
    Field Value
    Type Description
    AmoebotSimulator
    | Edit this page View Source

    renderSystem

    The render system handling the visualization.

    Declaration
    public RenderSystem renderSystem
    Field Value
    Type Description
    RenderSystem
    | Edit this page View Source

    running

    Whether the simulation is currently running.

    Declaration
    public bool running
    Field Value
    Type Description
    bool
    | Edit this page View Source

    system

    The particle system handling the simulation.

    Declaration
    public ParticleSystem system
    Field Value
    Type Description
    ParticleSystem
    | Edit this page View Source

    uiHandler

    Reference to the UI handler root object.

    Declaration
    public UIHandler uiHandler
    Field Value
    Type Description
    UIHandler

    Methods

    | Edit this page View Source

    FixedUpdate()

    Declaration
    private void FixedUpdate()
    | Edit this page View Source

    OpenInitModeCoroutine()

    Helper coroutine that opens the Init Mode UI after waiting for all required components to be initialized.

    Declaration
    private IEnumerator OpenInitModeCoroutine()
    Returns
    Type Description
    IEnumerator
    | Edit this page View Source

    PauseSim()

    Pauses the simulation.

    Declaration
    public void PauseSim()
    | Edit this page View Source

    PlaySim()

    Starts playing the simulation.

    Declaration
    public void PlaySim()
    | Edit this page View Source

    PlayStep()

    Triggers the simulation of a single round or a step forward in the simulation history, depending on where the marker is. Called on each FixedUpdate while the simulation is running.

    Declaration
    public void PlayStep()
    | Edit this page View Source

    RoundChanged()

    Triggers UI updates after the displayed round has changed in Simulation Mode. Should be called every time the round changes.

    Declaration
    public void RoundChanged()
    | Edit this page View Source

    SetSimSpeed(float)

    Updates the simulation speed to the given value.

    Declaration
    public void SetSimSpeed(float roundTime)
    Parameters
    Type Name Description
    float roundTime

    The time between two round simulations.

    | Edit this page View Source

    Start()

    Declaration
    private void Start()
    | Edit this page View Source

    TogglePlayPause()

    Toggles the play state of the simulation between Playing and Paused.

    Declaration
    public void TogglePlayPause()
    | Edit this page View Source

    Update()

    Declaration
    private void Update()
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX