public void Init(Vector3 startPosition, Vector3 endPosition, OnCollected onCollected, PoolManager poolManager) { m_scrollingObject.SetStartPoint(startPosition); m_scrollingObject.SetEndPoint(endPosition); m_scrollingObject.OnScrollComplete += OnCollect; m_scrollingObject.Play(); m_onCollected = onCollected; m_poolManager = poolManager; }
public void Init(int eggID, Vector3 startPosition, Vector3 endPosition, OnCollected onCollected, PoolManager poolManager) { //allocate the specified easter egg EasterEggs[eggID].SetActive(true); m_scrollingObject.SetStartPoint(startPosition); m_scrollingObject.SetEndPoint(endPosition); m_scrollingObject.OnScrollComplete += OnCollect; m_scrollingObject.Play(); m_onCollected = onCollected; m_poolManager = poolManager; }
public void Init(Vector3 startPosition, Vector3 endPosition, bool scroll, OnExtinguished onExtinguished, PoolManager poolManager) { m_scrollingObject.SetStartPoint(startPosition); m_scrollingObject.SetEndPoint(endPosition); m_scroll = scroll; m_onExtinguished = onExtinguished; if (m_scroll) { m_scrollingObject.OnScrollComplete += OnExtinguish; m_scrollingObject.Play(); } m_poolManager = poolManager; }