Exemplo n.º 1
0
        public void Reuse(Vector3 position, Quaternion rotation, Vector2 direction)
        {
            ResetObjectPhysics();                     //resets the object's physics
            gameObject.SetActive(true);
            gameObject.transform.position = position; // gives the object correct spawn parameters
            gameObject.transform.rotation = rotation; //

            if (hasPoolObjectComponent)
            {
                poolObjectScript.OnObjectReuse();
                poolObjectScript.FireMe(direction);
            }
        }