Ejemplo n.º 1
0
        public ListExecuteControllers(AllExecutableObjects listExecutableObjects, BonusesContainer container)
        {
            _executableObjects = listExecutableObjects;

            var bonusCreator = new BonusCreator(listExecutableObjects, container);

            _cameraController = new CameraController(Reference.PlayerBall.transform, Reference.MainCamera);
            AddExecutableController(_cameraController);
            AddExecutableController(Reference.PlayerBall);

            var inputController = new InputController(Reference.PlayerBall);

            AddExecutableController(inputController);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Read the information of bank account from binary reader
        /// </summary>
        /// <param name="reader">Binary reader for reading</param>
        /// <returns>New instance of bank account that has information</returns>
        private BankAccount ReadAccount(BinaryReader reader)
        {
            string      accountNumber = reader.ReadString();
            Owner       owner         = new OwnerBinaryReadWrite(reader, null).Read();
            decimal     amount        = reader.ReadDecimal();
            string      bonusType     = reader.ReadString();
            int         bonusCount    = reader.ReadInt32();
            bool        isClosed      = reader.ReadBoolean();
            BankAccount bankAccount   = new BankAccount(accountNumber, owner, BonusCreator.Create(bonusType, bonusCount), amount);

            if (isClosed)
            {
                bankAccount.Close();
            }

            return(bankAccount);
        }