void Start() { for (int i = 0; i < 200; i++) { int n = Random.Range(0, 4) + 1; ObstacleVO obstacle = InGameData.Instance.ObstacleList.Find(a => a.Type == n).Copy(); obstacle.SetCreatePosition(2000 + (i * Random.Range(0, 5) * 60)); ObstacleList.Add(obstacle); } }
public void Init(ObstacleVO obstaclevo) { obstacle = obstaclevo; m_img.sprite = InGameData.Instance.ObstacleSpriteList[obstaclevo.Type - 1]; StartCoroutine(MoveRoutine()); if (obstacle.Type == 2) { Vector3 vc3 = transform.localPosition; vc3.y = -325; transform.localPosition = vc3; } else if (obstacle.Type != 1) { Vector3 vc3 = transform.localPosition; vc3.y = Random.Range(-140, 140); transform.localPosition = vc3; } else if (obstacle.Type == 1) { m_dtSpecialEvent = GetComponent <DOTweenAnimation>(); m_dtSpecialEvent.tween.Restart(); } }
private void CreateEnemyObstacle(ObstacleVO obstacle) { _enemyObstacleDict.Add(obstacle.ObjID.ID, obstacle); }