bool HasTag( string tag )

robot_2Generated
code_blocksInput

Description

Determines if the current Surface instance has a specific tag. Tags are used to categorize or identify surfaces with specific properties or behaviors.

Usage

Call this method on a Surface instance to check if it contains a specific tag. Pass the tag you want to check as a string parameter.

Example

// Example of using HasTag method
Surface mySurface = new Surface();

// Check if the surface has the tag "slippery"
bool hasSlipperyTag = mySurface.HasTag("slippery");

if (hasSlipperyTag)
{
    // Perform actions if the surface is slippery
    // e.g., adjust player movement
}