Ejemplo n.º 1
0
 private void Start()
 {
     dataBinding = CoreServicesInstaller.Resolve <DataBindingService>();
     dataBinding.Bind <float>(Constants.DATABINDING_CAMERA_ZOOM, this);
     dataBinding.Bind <Vector3>(Constants.DATABINDING_CAMERA_POSITON, this);
     dataBinding.Bind <bool>(cameraInstancePath, this);
 }
Ejemplo n.º 2
0
 public void OnValueChanged(string branch, KeyValuePair <string, string> value)
 {
     if (!string.IsNullOrEmpty(value.Key) && !string.IsNullOrEmpty(value.Value))
     {
         var guiService    = CoreServicesInstaller.Resolve <GUIService>();
         var rectTransform = guiService.GetPanelView(value.Key).GetView <MonoBehaviour>(value.Value).GetComponent <RectTransform>();
         mask        = rectTransform.rect.ToServiceRect();
         mask.width *= Utils.GetUIScaleFactor();
         mask.x      = -mask.width / 2f;
         mask.x     += rectTransform.position.x / Screen.width * Constants.SCREEN_WIDTH;
         mask.y     += rectTransform.position.y / Screen.height * Constants.SCREEN_HEIGHT;
     }
 }
Ejemplo n.º 3
0
 protected override void Awake()
 {
     base.Awake();
     spriteAtlas = CoreServicesInstaller.Resolve <SpriteAtlasService>();
 }
Ejemplo n.º 4
0
 protected virtual void Awake()
 {
     component   = GetComponent <T>();
     databinding = CoreServicesInstaller.Resolve <DataBindingService>();
 }
Ejemplo n.º 5
0
 protected override void Bind()
 {
     base.Bind();
     CoreServicesInstaller.Resolve <DataBindingService>().Bind <Services.Core.Rect>(Constants.DATABINDING_TUTORIAL_DIALOG_SIZE_PATH, this);
 }