Exemple #1
0
    public override void Initialize(Contexts contexts, IEntity entity)
    {
        base.Initialize(contexts, entity);

        _text = GetComponent <TextMeshProUGUI>();
        if (_text == null)
        {
            throw new NullReferenceException("ScoreDisplayView - text is missing!");
        }

        Scale       = Vector3.one;
        _text.color = new Color(_text.color.r, _text.color.g, _text.color.b, 1.0f);

        if (_originalPos == Vector2.one * 1000)
        {
            _originalPos = rectTransform.anchoredPosition;
        }
        else
        {
            rectTransform.anchoredPosition = _originalPos;
        }

        Rotation = new Vector3(0, 0, Rand.game.Int(-15, 15));

        LinkedEntity.isViewEnable = true;

        LinkedEntity.AddViewEnableListener(this);
        LinkedEntity.AddViewEnableRemovedListener(this);
    }
Exemple #2
0
    public override void Initialize(Contexts contexts, IEntity entity)
    {
        base.Initialize(contexts, entity);

        LinkedEntity.AddViewEnableListener(this);
        LinkedEntity.AddViewEnableRemovedListener(this);

        AddListener();
    }
Exemple #3
0
    public override void Initialize(Contexts contexts, IEntity entity)
    {
        base.Initialize(contexts, entity);

        Enabled = false;
        LinkedEntity.isTutorial = true;

        LinkedEntity.AddViewEnableListener(this);
        LinkedEntity.AddViewEnableRemovedListener(this);
    }
Exemple #4
0
    public override void Initialize(Contexts contexts, IEntity entity)
    {
        base.Initialize(contexts, entity);

        Enabled = false;
        LinkedEntity.isLevelProgressBar = true;

        LinkedEntity.AddViewEnableListener(this);
        LinkedEntity.AddViewEnableRemovedListener(this);

        var levelListenerEntity = contexts.gameState.CreateEntity();

        levelListenerEntity.AddAnyCurrentLevelListener(this);
    }
Exemple #5
0
    public override void Initialize(Contexts contexts, IEntity entity)
    {
        base.Initialize(contexts, entity);

        _buttonsInteracteBuffer = new bool[_buttons.Length];

        LinkedEntity.isViewEnable   = false;
        LinkedEntity.isInteractable = false;
        OnInteractableRemoved(null);

        LinkedEntity.AddViewEnableListener(this);
        LinkedEntity.AddViewEnableRemovedListener(this);
        LinkedEntity.AddInteractableListener(this);
        LinkedEntity.AddInteractableRemovedListener(this);
    }