void Start() { var inactive = new InactiveState <Feed>(redLight); active = new ActiveState <Feed>(this, redLight); var explode = new ExplodeState <Feed>(explosionParticleSys, this); inactive.AddTransition(Feed.EnemigoEntraEnLOS, active); active.AddTransition(Feed.EnemigoSaleDeLOS, inactive); active.AddTransition(Feed.BOOOOM, explode); stateMachine = new FSM <Feed>(inactive); los = GetComponent <LOS>(); }