// Use this for initialization void Start () { walkAnimation = gameObject.GetComponentInChildren<Animator>(); trapState = trapStates.TooEarly; maxXPosition = -8; maxPosition = new Vector2(maxXPosition, 0); trajectory = new Vector2(speed,0); victimOutOfBounds = false; }
void SetTrapable() { if (IsVictimTrapable()) { isTrapable = true; trapState = trapStates.OnTime; } else { isTrapable = false; if (trapState==trapStates.OnTime) { trapState = trapStates.TooLate; } } }