public void InitRotate(Color c) { type = TYPE_GV_MAP_ENEMY.ROTATE; img.color = c; vt = new Vector3(0, 0, Random.Range(-1f, 1f)); speed = Random.Range(100, 300); }
public void InitLR(float lengthSegment, Color c) { type = TYPE_GV_MAP_ENEMY.MOVING_LR; currPos = transform.position; APoint = currPos + new Vector3(-lengthSegment / 2 + 0.35f, 0, 0); BPoint = currPos + new Vector3(lengthSegment / 2 - 0.35f, 0, 0); isMoveBack = false; img.color = c; }
public void InitBT(Color c) { type = TYPE_GV_MAP_ENEMY.MOVING_BT; currPos = transform.position; APoint = currPos + new Vector3(0, -1.03f, 0); BPoint = currPos + new Vector3(0, 1.03f, 0); isMoveBack = false; img.color = c; }