Exemplo n.º 1
0
        private IEnumerator DichStart()
        {
            yield return(null);

            lightningParticleSystem.SetActive(false);
            Contexts contexts = Contexts.sharedInstance;

            canvasRect = transform.Find("Canvas").GetComponent <RectTransform>();
            Text          text        = transform.Find("Canvas/Empty_PowerValueRoot/Text").GetComponent <Text>();
            RectTransform upperObject = transform.Find("Canvas/Empty_UpperObject").GetComponent <RectTransform>();

            wppContext = Contexts.sharedInstance.wppAccrual;
            wppContext.DestroyAllEntities();
            Slider     powerScaleSlider = transform.Find("Canvas/Empty_PowerValueRoot/Slider").GetComponent <Slider>();
            GameObject redScale         = transform.Find("Canvas/Empty_PowerValueRoot").gameObject;
            GameObject greenScale       = transform.Find("Canvas/Empty_FilledPowerScale").gameObject;

            systems = new Systems()
                      //Движение наград
                      .Add(new WppImagesInstantiatorSystem(contexts, canvasRect, wppIconPrefab))
                      .Add(new IconsDataUpdaterSystem(contexts))
                      .Add(new IconsUpdaterSystem(contexts, upperObject))
                      .Add(new WppViewDestroySystem(contexts))
                      .Add(new WppScaleUpdaterSystem(contexts.wppAccrual, text, redScale, greenScale, powerScaleSlider))
            ;

            if (wppContext == null)
            {
                throw new NullReferenceException("context is null in start");
            }
        }
Exemplo n.º 2
0
    public Contexts()
    {
        game       = new GameContext();
        input      = new InputContext();
        lobbyUi    = new LobbyUiContext();
        lootbox    = new LootboxContext();
        wppAccrual = new WppAccrualContext();

        var postConstructors = System.Linq.Enumerable.Where(
            GetType().GetMethods(),
            method => System.Attribute.IsDefined(method, typeof(Entitas.CodeGeneration.Attributes.PostConstructorAttribute))
            );

        foreach (var postConstructor in postConstructors)
        {
            postConstructor.Invoke(this, null);
        }
    }
Exemplo n.º 3
0
 public WppViewDestroySystem(Contexts contexts)
 {
     uiSoundsManager   = UiSoundsManager.Instance();
     context           = contexts.wppAccrual;
     movingAwardsGroup = context.GetGroup(WppAccrualMatcher.MovingIcon);
 }