Пример #1
0
    private void Awake()
    {
        //Cache
        inScreenObject = GetComponent <HorizontalInScreenObject>();

        //Set callback to return object to pool when it goes out of screen
        inScreenObject.SetOutOfScreenCallback(returnPipeToPool);
    }
Пример #2
0
    private void Awake()
    {
        //Cache
        motor          = GetComponent <CloudMotor>();
        inScreenObject = GetComponent <HorizontalInScreenObject>();
        spRenderer     = GetComponent <SpriteRenderer>();

        //Set reset callback for when object goes out of screen
        inScreenObject.SetOutOfScreenCallback(resetPosition);
    }