public void changeState(int i) { switch (i) { case 0: state = fState.swim; break; case 1: state = fState.baited; break; case 2: state = fState.toPlayer; direction = holder.transform.position - transform.position; //veloY = 1; break; case 3: state = fState.hold; break; } }
public void playerCollideInteraction(GameObject player) { switch ((int)state) { case 0: break; case 1: break; case 2: state = fState.hold; Player p = player.GetComponent <Player>(); this.gameObject.transform.parent = p.model.transform; p.holdingFish = true; p.state = 0; break; case 3: break; } }