// Use this for initialization void Start() { timer = new Timer(0, OnTimer); randomizeDelay(); moving_up = Subs.RandomBool(); start_pos = transform.position; }
// Use this for initialization public TileData(Vector3 startpos, int tileGroup) { tile_group = tileGroup; setMovementBounds(0, 0); Position = start_pos = move_target = startpos; timer = new Timer(1000, OnTimerRandom); timer.Active = false; moving_up = Subs.RandomBool(); }
void RandomDirection() { ChangeDirection(Subs.RandomBool()); }