Esempio n. 1
0
 private void Awake()
 {
     StatsMath       = new StatsMath();
     SpaceShip       = new SpaceShip();
     CharacterPool   = new CharacterPool();
     StartConditions = new StartConditions();
     ButtonModel     = new ButtonModel();
     Scenario        = new Scenario();
     References      = FindObjectOfType <References>();
 }
Esempio n. 2
0
        public StatsMath()
        {
            characterPool  = Models.CharacterPool;
            coefficientsGO = GameObject.Find("Coefficients");
            coefficients   = coefficientsGO.GetComponent <Coefficients>();

            if (coefficients == null)
            {
                Debug.Log("Coefs == null");
            }
        }
Esempio n. 3
0
        void Start()
        {
            shipController  = FindObjectOfType <ShipController>();
            statsMath       = Models.StatsMath;
            pool            = Models.CharacterPool;
            startConditions = Models.StartConditions;

            AddAllChildren();
            SetStartPeopleCount();

            CharInListView.OnCharClicked += ViewChar;
            Dragable.OnDragEvent         += OnDrag;
            Droppable.OnDropEvent        += OnDrop;
        }
Esempio n. 4
0
        void Start()
        {
            layout = GetComponent <GridLayoutGroup>();
            rect   = GetComponent <RectTransform>();
            pool   = Models.CharacterPool;

            pool.Characters.ObserveAdd()
            .Subscribe(x => AddToView(x.Value))
            .AddTo(this);

            pool.Characters.ObserveRemove()
            .Subscribe(x => RemoveFromView(x.Value.Id))
            .AddTo(this);

            PoolController.OnSendChar += UpdateBlockView;
        }