Provides access to information about a click in the TerrariumDirectDrawGameView. A click can correspond to a creature, and this class provides access to the creature clicked.
Inheritance: System.EventArgs
 /// <summary>
 ///  Helper function for firing the OrganismClicked event
 ///  whenever an organism is selected within the game
 ///  view.
 /// </summary>
 /// <param name="e">Event arguments detailing which organism was clicked.</param>
 private void OnOrganismClicked(OrganismClickedEventArgs e)
 {
     if (OrganismClicked != null)
     {
         OrganismClicked(this, e);
     }
 }
Esempio n. 2
0
        private void Organism_Clicked(object sender, OrganismClickedEventArgs e)
        {
            if (((TerrariumSprite)e.OrganismState.RenderInfo).Selected == true)
            {
                if (traceWindow != null)
                {
                    traceWindow.SelectOrganism(e.OrganismState);
                }

                if (propertySheet != null)
                {
                    propertySheet.SelectObject(e.OrganismState);
                }
            }
            else
            {
                if (traceWindow != null)
                {
                    traceWindow.UnselectOrganism(e.OrganismState);
                }

                if (propertySheet != null)
                {
                    propertySheet.UnselectObject(e.OrganismState);
                }
            }
        }