public DataTransferService(IRemoteDataServiceFactory remoteDataServiceFactory,
     ICallCopyServiceFactory callCopyServiceFactory,
     ITimerWrapper timer, IConfigurationManagerWrapper configurationManager)
 {
     InitializeComponent();
     _remoteDataServiceFactory = remoteDataServiceFactory;
     _timer = timer;
     _configurationManager = configurationManager;
     _transferer = new Transferer(callCopyServiceFactory.Construct(configurationManager));
 }
Пример #2
0
    public override void OnInstantiate()
    {
        col         = GetComponent <CircleCollider2D>();
        col.enabled = false;

        rend         = GetComponentInChildren <SpriteRenderer>();
        rend.enabled = false;

        transferer = GetComponent <Transferer>();
        transferer.OnInstantiate();
        //return snowball back to the pool if end point reached
        transferer.OnMoveEndEvent.AddListener(Miss);

        gameObject.SetActive(false);
    }
Пример #3
0
    public override void OnInstantiate()
    {
        Col         = GetComponent <CircleCollider2D>();
        Col.enabled = false;

        rb             = GetComponent <Rigidbody2D>();
        rb.isKinematic = true;

        rend         = GetComponentInChildren <SpriteRenderer>();
        rend.enabled = false;

        nameTxt = GetComponentInChildren <TextMesh>();

        transferer = GetComponent <Transferer>();
        transferer.OnInstantiate();
        //After ended movement action, recheck for another action to perform
        transferer.OnMoveEndEvent.AddListener(Act);
    }