Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Sample code to use TriggerAction abstract class:

public class TriggerActionFly : TriggerAction
{
    protected override void OnTriggered()
    {
        gameObject.GetComponent<Renderer>().material.color = Color.red;
    }
    protected override void TriggeredUpdate()
    {
        gameObject.transform.position += Vector3.right * 0.1f;
    }
}