/// <summary> /// 生产萝卜 /// </summary> private void SpawnLuobo(Vector3 pos) { GameObject go = Game.Instance.ObjectPool.Spawn("Luobo"); _luobo = go.GetComponent <Luobo>(); _luobo.Dead += LuoboOnDead; _luobo.transform.position = pos; }
public void SpawnLuobo(Vector3 position) { GameObject go = Game.Instance.ObjectPool.Spawn("Luobo"); m_Luobo = go.GetComponent <Luobo>(); m_Luobo.Dead += luobo_Dead; m_Luobo.transform.position = position; }
//创建萝卜 void SpawnLuobo(Vector3 position) { GameObject go = Game.Instance.ObjectPool.Spawn("Luobo"); Luobo luobo = go.GetComponent <Luobo>(); luobo.Position = position; luobo.Dead += luobo_Dead; m_Luobo = luobo; }