Beispiel #1
0
    private void Awake()
    {
        BaseGameManager <AdsManager> .GetInstance();

        for (int i = 0; i < 4; i++)
        {
            //
            //if (this.versionNames[i] == VoodooSauce.GetPlayerCohort())
            //{
            //    this.gameId = (GameType)i;
            //}
        }
    }
Beispiel #2
0
        private void mapView()
        {
            gameManager = BaseGameManager.GetInstance();

            Dictionary <object, object> binded;

            object key = this.GetType();

            IBinding binding = gameManager.mediatorMap.GetBind(key);

            binded = binding.Binded;

            foreach (KeyValuePair <object, object> bindedPair in binded)
            {
                Type mediateType = bindedPair.Value as Type;
                View view;

                foreach (View item in GameObject.FindObjectsOfType(key as Type))
                {
                    if (item == this)
                    {
                        view = item;

                        view.gameObject.AddComponent(mediateType);

                        mediate = view.GetComponent(mediateType) as Mediator;
                        mediate.SetView(view);

                        Dictionary <object, IMediator> mediated;
                        if (!gameManager.mediatorMap.mediators.ContainsKey(key))
                        {
                            mediated = new Dictionary <object, IMediator>();
                            mediated.Add(this, mediate);
                            gameManager.mediatorMap.mediators.Add(key, mediated);
                        }
                        else
                        {
                            mediated = gameManager.mediatorMap.mediators[key];
                            if (!mediated.ContainsKey(this))
                            {
                                mediated.Add(this, mediate);
                            }
                        }
                        mediate.OnRegister();
                    }
                }
            }
        }
Beispiel #3
0
 public Command()
 {
     _uManager   = BaseGameManager.GetInstance();
     _dispatcher = _uManager.dispatcher;
 }
Beispiel #4
0
    public GameObject spinWheelRounded;//圆形的SpinWheel

    public void BuyNoAds()
    {
        this.clickAudio.Play();
        BaseGameManager <AdsManager> .GetInstance().BuyNoAds();
    }
Beispiel #5
0
 public Mediator()
 {
     _uManager   = BaseGameManager.GetInstance();
     _dispatcher = _uManager.dispatcher;
 }