public void InitProc(ePattern ptn) { initDictionary[ptn](); direction = Random.Range(0, 2) == 0 ? eDirection.Left : eDirection.Right; stopTime = 0.0f; switch (direction) { case eDirection.Left: tran.position = new Vector3(tran.position.x * -1, tran.position.y); tran.rotation = Quaternion.Euler(0.0f, 0.0f, 180.0f); break; case eDirection.Right: tran.rotation = Quaternion.Euler(0.0f, 0.0f, 0.0f); velocity *= -1; break; } }
public void UpdateProc(ePattern ptn) { updateDictionary[ptn](); }