public void SpawnCoinGroup(string name, Vector3 position) { Vector3 spawn_position = Coin_Spawn_Point.position; if (GameLogicManager.Instance.GetPlayerPosition().x + 2 > Coin_Spawn_Limit_Point.position.x) { return; } Comp_Coin_Group comp_Coin_Group = map_Coin_Group[name]; for (int i = 0; i < comp_Coin_Group.positions.Count; ++i) { cCoin coin = getFirstCoinAvaible(); coin._transform.position = comp_Coin_Group.positions[i].position + spawn_position; coin.Enable(); } }
// Use this for initialization void Awake() { comp_Coin_Manager = GameObject.Find("GameLogic_Manager").GetComponent <Comp_Coin_Manager>(); coin = new cCoin(this); }