void Update() { miniPos = transform.position; switch (minimapstate) { case MINIMAPSTATE.NONE: break; case MINIMAPSTATE.RIGHT: if (player.GetComponent <PlayerController>().playstate == PlayerController.PLAYSTATE.NONE) { minimapstate = MINIMAPSTATE.NONE; } transform.Translate(miniSP * Time.deltaTime, 0, 0); break; case MINIMAPSTATE.LEFT: if (player.GetComponent <PlayerController>().playstate == PlayerController.PLAYSTATE.NONE) { minimapstate = MINIMAPSTATE.NONE; } transform.Translate(-miniSP * Time.deltaTime, 0, 0); break; default: break; } }
public void NoneSTA() { minimapstate = MINIMAPSTATE.NONE; }
public void LeftMV() { minimapstate = MINIMAPSTATE.LEFT; }
public void RightMV() { minimapstate = MINIMAPSTATE.RIGHT; }