Esempio n. 1
0
        public SkillsManager(ILogger <SkillsManager> logger, IGameDefinitionsPreloder definitionsPreloder, IDatabase database, IHealthManager healthManager, IAttackManager attackManager, IBuffsManager buffsManager, IStatsManager statsManager, IElementProvider elementProvider, ICountryProvider countryProvider, ICharacterConfiguration characterConfig, ILevelProvider levelProvider, IAdditionalInfoManager additionalInfoManager, IMapProvider mapProvider, ITeleportationManager teleportationManager, IMovementManager movementManager, IShapeManager shapeManager, IPartyManager partyManager, IGamePacketFactory packetFactory)
        {
            _logger = logger;
            _definitionsPreloder      = definitionsPreloder;
            _database                 = database;
            _healthManager            = healthManager;
            _attackManager            = attackManager;
            _buffsManager             = buffsManager;
            _statsManager             = statsManager;
            _elementProvider          = elementProvider;
            _countryProvider          = countryProvider;
            _characterConfig          = characterConfig;
            _levelProvider            = levelProvider;
            _additionalInfoManager    = additionalInfoManager;
            _mapProvider              = mapProvider;
            _teleportationManager     = teleportationManager;
            _movementManager          = movementManager;
            _shapeManager             = shapeManager;
            _partyManager             = partyManager;
            _packetFactory            = packetFactory;
            _levelProvider.OnLevelUp += OnLevelUp;

#if DEBUG
            _logger.LogDebug("SkillsManager {hashcode} created", GetHashCode());
#endif
        }
Esempio n. 2
0
 public GMCreateMobHandler(IGamePacketFactory packetFactory, IGameSession gameSession, IDatabasePreloader databasePreloader, IMovementManager movementManager, IMobFactory mobFactory, IMapProvider mapProvider) : base(packetFactory, gameSession)
 {
     _databasePreloader = databasePreloader;
     _movementManager   = movementManager;
     _mobFactory        = mobFactory;
     _mapProvider       = mapProvider;
 }
Esempio n. 3
0
 public GMCreateNpcHandler(IGamePacketFactory packetFactory, IGameSession gameSession, IGameDefinitionsPreloder definitionsPreloder, IMovementManager movementManager, IMapProvider mapProvider, IGameWorld gameWorld, INpcFactory npcFactory) : base(packetFactory, gameSession)
 {
     _definitionsPreloder = definitionsPreloder;
     _movementManager     = movementManager;
     _mapProvider         = mapProvider;
     _gameWorld           = gameWorld;
     _npcFactory          = npcFactory;
 }
Esempio n. 4
0
        public IncomeTickProcessor(IMovementManager movementEvaluator, IIntervalFromLastTickService intervalFromLastTickService)
        {
            Contract.Assert(movementEvaluator != null, "movementEvaluator!=null");
            Contract.Assert(intervalFromLastTickService != null, "intervalFromLastTickService!=null");

            _movementEvaluator           = movementEvaluator;
            _intervalFromLastTickService = intervalFromLastTickService;
        }
Esempio n. 5
0
 public VehicleHandlers(IGamePacketFactory packetFactory, IGameSession gameSession, IVehicleManager vehicleManager, IInventoryManager inventoryManager, IMapProvider mapProvider, ICountryProvider countryProvider, IMovementManager movementManager) : base(packetFactory, gameSession)
 {
     _vehicleManager   = vehicleManager;
     _inventoryManager = inventoryManager;
     _mapProvider      = mapProvider;
     _countryProvider  = countryProvider;
     _movementManager  = movementManager;
 }
Esempio n. 6
0
 public MainPage()
 {
     this.speechManager = new SpeechManager();
     //this.movementManager = new EZBMovementManager();
     this.movementManager = new DebugMovementManager();
     this.reminderManager = new ReminderManager();
     this.voiceManager    = new VoiceManager();
     this.InitializeComponent();
 }
Esempio n. 7
0
        public void SetUp()
        {
            this._players = new PlayerPair(new Player(new User("Alessandro"), PlayerColor.WHITE),
                                           new Player(new User("Tommaso"), PlayerColor.BLACK));

            this._gameController = new ClassicGameController(this._startingBoardFactory.ClassicBoard(this._players),
                                                             this._pieceMovementStrategies, this._players);
            this._movementManager = new ClassicMovementManager(this._gameController);
        }
Esempio n. 8
0
 public MoveCharacterHandler(ILogger <MoveCharacterHandler> logger, IGamePacketFactory packetFactory, IGameSession gameSession, IBuffsManager buffsManager, IMovementManager movementManager, ITeleportationManager teleportationManager, ISkillsManager skillsManager, ISpeedManager speedManager) : base(packetFactory, gameSession)
 {
     _logger               = logger;
     _buffsManager         = buffsManager;
     _movementManager      = movementManager;
     _teleportationManager = teleportationManager;
     _skillsManager        = skillsManager;
     _speedManager         = speedManager;
 }
Esempio n. 9
0
 public MovementAuthorityController(IMovementPermisionManager _movementPermisionManager, IMovementManager _movementManager, AssetManager _assetManager, OrganizationManager _organizationManager, BranchManager _branchManager, IUserManager _userManager)
 {
     movementPermisionManager = _movementPermisionManager;
     movementManager          = _movementManager;
     assetManager             = _assetManager;
     organizationManager      = _organizationManager;
     branchManager            = _branchManager;
     userManager = _userManager;
 }
Esempio n. 10
0
 public GMTeleportHandler(IGamePacketFactory packetFactory, IGameSession gameSession, IGameWorld gameWorld, IMapsLoader mapLoader, ICountryProvider countryProvider, ITeleportationManager teleportationManager, IMovementManager movementManager, IPartyManager partyManager, IGuildManager guildManager) : base(packetFactory, gameSession)
 {
     _gameWorld            = gameWorld;
     _mapLoader            = mapLoader;
     _countryProvider      = countryProvider;
     _teleportationManager = teleportationManager;
     _movementManager      = movementManager;
     _partyManager         = partyManager;
     _guildManager         = guildManager;
 }
Esempio n. 11
0
        public PersistingSvc(IMovementManager movementManager)
        {
            _movementManager = movementManager;
            _movements       = new List <DeviceMovementDc>();

            _lock           = new object();
            _timer          = new Timer(3000);
            _timer.Elapsed += TimerOnElapsed;
            _timer.Start();
        }
Esempio n. 12
0
 public RebirthHandler(IGamePacketFactory packetFactory, IGameSession gameSession, IMapProvider mapProvider, IGameWorld gameWorld, IHealthManager healthManager, ITeleportationManager teleportationManager, IMovementManager movementManager, IBuffsManager buffsManager, IInventoryManager inventoryManager, IGameDefinitionsPreloder definitionsPreloder) : base(packetFactory, gameSession)
 {
     _mapProvider          = mapProvider;
     _gameWorld            = gameWorld;
     _healthManager        = healthManager;
     _teleportationManager = teleportationManager;
     _movementManager      = movementManager;
     _buffsManager         = buffsManager;
     _inventoryManager     = inventoryManager;
     _definitionsPreloder  = definitionsPreloder;
 }
 public MovementController(IAssetManager _assetManager, UiLoader.UiLoader _loader, IBrandManager _brandManager, IOrganizationManager _organizationManager, IMovementManager _movementManager, IAssetRegistrationDetailsManager _assetdetailsmanager, IUserManager _userManager, IMovementPermisionManager _movementPermisionManager, IBranchManager _branchManager)
 {
     assetManager             = _assetManager;
     loader                   = _loader;
     brandManager             = _brandManager;
     organizationManager      = _organizationManager;
     movementManager          = _movementManager;
     assetdetailsmanager      = _assetdetailsmanager;
     userManager              = _userManager;
     movementPermisionManager = _movementPermisionManager;
     branchManager            = _branchManager;
 }
    void Awake()
    {
        anim = GetComponent <Animator>();
        GameObject player = GameObject.Find("Player");

        if (player)
        {
            playerTransform = player.transform;
        }
        stats           = GetComponent <EnemyStats>();
        movementManager = GetComponent <IMovementManager>();
    }
Esempio n. 15
0
 public BaseKillable(IDatabasePreloader databasePreloader, ICountryProvider countryProvider, IStatsManager statsManager, IHealthManager healthManager, ILevelProvider levelProvider, IBuffsManager buffsManager, IElementProvider elementProvider, IMovementManager movementManager, IUntouchableManager untouchableManager, IMapProvider mapProvider)
 {
     _databasePreloader = databasePreloader;
     CountryProvider    = countryProvider;
     StatsManager       = statsManager;
     HealthManager      = healthManager;
     LevelProvider      = levelProvider;
     BuffsManager       = buffsManager;
     ElementProvider    = elementProvider;
     MovementManager    = movementManager;
     UntouchableManager = untouchableManager;
     MapProvider        = mapProvider;
 }
Esempio n. 16
0
        public MovementAppService(
            IMovementManager movementManager,
            IRepository <Product> productRepository,
            ProductManager productManager,
            UserManager userManager)
        {
            _movementManager   = movementManager;
            _productRepository = productRepository;
            _productManager    = productManager;
            _userManager       = userManager;

            Logger = NullLogger.Instance;
        }
Esempio n. 17
0
        public Mob(ushort mobId,
                   bool shouldRebirth,
                   MoveArea moveArea,
                   ILogger <Mob> logger,
                   IDatabasePreloader databasePreloader,
                   IAIManager aiManager,
                   IItemEnchantConfiguration enchantConfig,
                   IItemCreateConfiguration itemCreateConfig,
                   ICountryProvider countryProvider,
                   IStatsManager statsManager,
                   IHealthManager healthManager,
                   ILevelProvider levelProvider,
                   ISpeedManager speedManager,
                   IAttackManager attackManager,
                   ISkillsManager skillsManager,
                   IBuffsManager buffsManager,
                   IElementProvider elementProvider,
                   IMovementManager movementManager,
                   IUntouchableManager untouchableManager,
                   IMapProvider mapProvider) : base(databasePreloader, countryProvider, statsManager, healthManager, levelProvider, buffsManager, elementProvider, movementManager, untouchableManager, mapProvider)
        {
            _logger           = logger;
            _enchantConfig    = enchantConfig;
            _itemCreateConfig = itemCreateConfig;
            _dbMob            = databasePreloader.Mobs[mobId];
            _moveArea         = moveArea;

            AIManager = aiManager;

            Exp           = _dbMob.Exp;
            ShouldRebirth = shouldRebirth;

            SpeedManager  = speedManager;
            AttackManager = attackManager;
            SkillsManager = skillsManager;

            ElementProvider.ConstAttackElement  = _dbMob.Element;
            ElementProvider.ConstDefenceElement = _dbMob.Element;

            if (ShouldRebirth)
            {
                _rebirthTimer.Interval = RespawnTimeInMilliseconds;
                _rebirthTimer.Elapsed += RebirthTimer_Elapsed;

                HealthManager.OnDead += MobRebirth_OnDead;
            }

            HealthManager.OnGotDamage += OnDecreaseHP;
            AIManager.OnStateChanged  += AIManager_OnStateChanged;
        }
Esempio n. 18
0
        public CastProtectionManager(ILogger <CastProtectionManager> logger, IMovementManager movementManager, IPartyManager partyProvider, IGamePacketFactory packetFactory, IGameSession gameSession, IMapProvider mapProvider)
        {
            _logger          = logger;
            _movementManager = movementManager;
            _partyProvider   = partyProvider;
            _packetFactory   = packetFactory;
            _gameSession     = gameSession;
            _mapProvider     = mapProvider;
            _checkProtectCastingSkill.Elapsed += CheckProtectCastingSkill_Elapsed;
            _checkProtectCastingSkill.Start();

#if DEBUG
            _logger.LogDebug("CastProtectionManager {hashcode} created", GetHashCode());
#endif
        }
Esempio n. 19
0
        public LevelingManager(ILogger <LevelingManager> logger, IDatabase database, ILevelProvider levelProvider, IAdditionalInfoManager additionalInfoManager, ICharacterConfiguration charConfig, IDatabasePreloader databasePreloader, IPartyManager partyManager, IMapProvider mapProvider, IMovementManager movementManager)
        {
            _logger                = logger;
            _database              = database;
            _levelProvider         = levelProvider;
            _additionalInfoManager = additionalInfoManager;
            _characterConfig       = charConfig;
            _databasePreloader     = databasePreloader;
            _partyManager          = partyManager;
            _mapProvider           = mapProvider;
            _movementManager       = movementManager;

#if DEBUG
            _logger.LogDebug("LevelingManager {hashcode} created", GetHashCode());
#endif
        }
        public TeleportationManager(ILogger <TeleportationManager> logger, IMovementManager movementManager, IMapProvider mapProvider, IDatabase database, ICountryProvider countryProvider, ILevelProvider levelProvider, IGameWorld gameWorld, IHealthManager healthManager)
        {
            _logger                     = logger;
            _movementManager            = movementManager;
            _mapProvider                = mapProvider;
            _database                   = database;
            _countryProvider            = countryProvider;
            _levelProvider              = levelProvider;
            _gameWorld                  = gameWorld;
            _healthManager              = healthManager;
            _castingTimer.Elapsed      += OnCastingTimer_Elapsed;
            _healthManager.OnGotDamage += HealthManager_OnGotDamage;
            _movementManager.OnMove    += MovementManager_OnMove;
#if DEBUG
            _logger.LogDebug("TeleportationManager {hashcode} created", GetHashCode());
#endif

            SavedPositions = new ReadOnlyDictionary <byte, (ushort MapId, float X, float Y, float Z)>(_savedPositions);
        }
Esempio n. 21
0
        public AIManager(ILogger <AIManager> logger, IMovementManager movementManager, ICountryProvider countryProvider, IAttackManager attackManager, IUntouchableManager untouchableManager, IMapProvider mapProvider, ISkillsManager skillsManager, IStatsManager statsManager, IElementProvider elementProvider, IGameDefinitionsPreloder definitionsPreloder, ISpeedManager speedManager)
        {
            _logger              = logger;
            _movementManager     = movementManager;
            _countryProvider     = countryProvider;
            _attackManager       = attackManager;
            _untouchableManager  = untouchableManager;
            _mapProvider         = mapProvider;
            _skillsManager       = skillsManager;
            _statsManager        = statsManager;
            _elementProvider     = elementProvider;
            _definitionsPreloder = definitionsPreloder;
            _speedManager        = speedManager;

            _attackManager.OnTargetChanged += AttackManager_OnTargetChanged;
#if DEBUG
            _logger.LogDebug("AIManager {hashcode} created", GetHashCode());
#endif
        }
Esempio n. 22
0
        public MainScene(IContext context, EntityManager entityManager, IMovementManager movementManager)
        {
            _context         = context;
            _entityManager   = entityManager;
            _movementManager = movementManager;

            _sceneManager = _context.GetRoot().createSceneManager();

            var shadergen = ShaderGenerator.getSingleton();

            shadergen.addSceneManager(_sceneManager); // must be done before we do anything with the scene

            _sceneManager.setAmbientLight(new ColourValue(.9f, .9f, .9f));

            _sceneLoader = new SceneLoader(context, entityManager)
            {
                FilePath = "Media/scenes/MainScene.xml"
            };
        }
Esempio n. 23
0
        public SkillCastingManager(ILogger <SkillCastingManager> logger, IMovementManager movementManager, ITeleportationManager teleportationManager, IHealthManager healthManager, ISkillsManager skillsManager, IBuffsManager buffsManager, IGameWorld gameWorld, ICastProtectionManager castProtectionManager)
        {
            _logger                = logger;
            _movementManager       = movementManager;
            _teleportationManager  = teleportationManager;
            _healthManager         = healthManager;
            _skillsManager         = skillsManager;
            _buffsManager          = buffsManager;
            _gameWorld             = gameWorld;
            _castProtectionManager = castProtectionManager;

            _castTimer.Elapsed                  += CastTimer_Elapsed;
            _movementManager.OnMove             += MovementManager_OnMove;
            _healthManager.OnGotDamage          += HealthManager_OnGotDamage;
            _buffsManager.OnBuffAdded           += BuffsManager_OnBuffAdded;
            _teleportationManager.OnTeleporting += TeleportationManager_OnTeleporting;

#if DEBUG
            _logger.LogDebug("SkillCastingManager {hashcode} created", GetHashCode());
#endif
        }
Esempio n. 24
0
        public DuelManager(ILogger <DuelManager> logger, IGameWorld gameWorld, ITradeManager tradeManager, IMovementManager movementManager, IHealthManager healthManager, IKillsManager killsManager, IMapProvider mapProvider, IInventoryManager inventoryManager, ITeleportationManager teleportationManager)
        {
            _logger                     = logger;
            _gameWorld                  = gameWorld;
            _tradeManager               = tradeManager;
            _movementManager            = movementManager;
            _healthManager              = healthManager;
            _killsManager               = killsManager;
            _mapProvider                = mapProvider;
            _inventoryManager           = inventoryManager;
            _teleportationManager       = teleportationManager;
            _duelRequestTimer.Interval  = 10000; // 10 seconds.
            _duelRequestTimer.Elapsed  += DuelRequestTimer_Elapsed;
            _duelRequestTimer.AutoReset = false;

            _duelStartTimer.Interval  = 5000; // 5 seconds.
            _duelStartTimer.Elapsed  += DuelStartTimer_Elapsed;
            _duelStartTimer.AutoReset = false;
#if DEBUG
            _logger.LogDebug("DuelManager {hashcode} created", GetHashCode());
#endif
        }
 public GMSummonPlayerHandler(IGamePacketFactory packetFactory, IGameSession gameSession, IGameWorld gameWorld, IMapProvider mapProvider, IMovementManager movementManager) : base(packetFactory, gameSession)
 {
     _gameWorld       = gameWorld;
     _mapProvider     = mapProvider;
     _movementManager = movementManager;
 }
Esempio n. 26
0
        public Character(ILogger <Character> logger,
                         IDatabasePreloader databasePreloader,
                         IGuildManager guildManager,
                         ICountryProvider countryProvider,
                         ISpeedManager speedManager,
                         IStatsManager statsManager,
                         IAdditionalInfoManager additionalInfoManager,
                         IHealthManager healthManager,
                         ILevelProvider levelProvider,
                         ILevelingManager levelingManager,
                         IInventoryManager inventoryManager,
                         IStealthManager stealthManager,
                         IAttackManager attackManager,
                         ISkillsManager skillsManager,
                         IBuffsManager buffsManager,
                         IElementProvider elementProvider,
                         IKillsManager killsManager,
                         IVehicleManager vehicleManager,
                         IShapeManager shapeManager,
                         IMovementManager movementManager,
                         ILinkingManager linkinManager,
                         IMapProvider mapProvider,
                         ITeleportationManager teleportationManager,
                         IPartyManager partyManager,
                         ITradeManager tradeManager,
                         IFriendsManager friendsManager,
                         IDuelManager duelManager,
                         IBankManager bankManager,
                         IQuestsManager questsManager,
                         IUntouchableManager untouchableManager,
                         IWarehouseManager warehouseManager,
                         IShopManager shopManager,
                         ISkillCastingManager skillCastingManager,
                         ICastProtectionManager castProtectionManager,
                         IGameSession gameSession,
                         IGamePacketFactory packetFactory) : base(databasePreloader, countryProvider, statsManager, healthManager, levelProvider, buffsManager, elementProvider, movementManager, untouchableManager, mapProvider)
        {
            _logger        = logger;
            _packetFactory = packetFactory;

            AdditionalInfoManager = additionalInfoManager;
            InventoryManager      = inventoryManager;
            StealthManager        = stealthManager;
            LevelingManager       = levelingManager;
            SpeedManager          = speedManager;
            AttackManager         = attackManager;
            SkillsManager         = skillsManager;
            KillsManager          = killsManager;
            VehicleManager        = vehicleManager;
            ShapeManager          = shapeManager;
            LinkingManager        = linkinManager;
            TeleportationManager  = teleportationManager;
            PartyManager          = partyManager;
            TradeManager          = tradeManager;
            FriendsManager        = friendsManager;
            DuelManager           = duelManager;
            GuildManager          = guildManager;
            BankManager           = bankManager;
            QuestsManager         = questsManager;
            WarehouseManager      = warehouseManager;
            ShopManager           = shopManager;
            SkillCastingManager   = skillCastingManager;
            CastProtectionManager = castProtectionManager;
            GameSession           = gameSession;

            HealthManager.MP_SP_Used += SendUseMPSP;
            HealthManager.OnCurrentHitpointsChanged += SendCurrentHitpoints;
            StatsManager.OnAdditionalStatsUpdate    += SendAdditionalStats;
            StatsManager.OnResetStats         += SendResetStats;
            BuffsManager.OnBuffAdded          += SendAddBuff;
            BuffsManager.OnBuffRemoved        += SendRemoveBuff;
            AttackManager.OnStartAttack       += SendAttackStart;
            VehicleManager.OnUsedVehicle      += SendUseVehicle;
            SkillsManager.OnResetSkills       += SendResetSkills;
            InventoryManager.OnAddItem        += SendAddItemToInventory;
            InventoryManager.OnRemoveItem     += SendRemoveItemFromInventory;
            InventoryManager.OnItemExpired    += SendItemExpired;
            AttackManager.TargetOnBuffAdded   += SendTargetAddBuff;
            AttackManager.TargetOnBuffRemoved += SendTargetRemoveBuff;
            DuelManager.OnDuelResponse        += SendDuelResponse;
            DuelManager.OnStart                   += SendDuelStart;
            DuelManager.OnCanceled                += SendDuelCancel;
            DuelManager.OnFinish                  += SendDuelFinish;
            LevelingManager.OnExpChanged          += SendExperienceGain;
            QuestsManager.OnQuestMobCountChanged  += SendQuestCountUpdate;
            QuestsManager.OnQuestFinished         += SendQuestFinished;
            ShopManager.OnUseShopClosed           += SendUseShopClosed;
            ShopManager.OnUseShopItemCountChanged += SendUseShopItemCountChanged;
            ShopManager.OnSoldItem                += SendSoldItem;

            Bless.Instance.OnDarkBlessChanged  += OnDarkBlessChanged;
            Bless.Instance.OnLightBlessChanged += OnLightBlessChanged;
        }
Esempio n. 27
0
    public void Start()
    {
        m_solidGroundCollider.enabled = false;

        switch (m_cameraMode)
        {
        case CameraType.Relative :
                m_movementManager = new RelativeMovementManager();
                m_externalCamera.gameObject.SetActive(false);
                m_innerCamera.gameObject.SetActive(true);
                break;
        case CameraType.Absolute :
                m_movementManager = new AbsoluteMovementManager();
                m_externalCamera.gameObject.SetActive(true);
                m_innerCamera.gameObject.SetActive(false);
            break;
            default:
                throw new MissingComponentException("Can't decode camera mode : " + m_cameraMode);
        }

        Debug.Log("Now inner camera is ("+m_innerCamera.gameObject.activeSelf+") and outer camera is ("+m_externalCamera.gameObject.activeSelf+")");

        m_externalCameraOffset = m_externalCamera.gameObject.transform.position - this.gameObject.transform.position;

        switch(m_inputMode)
        {
        case InputType.Keyboard:
                m_inputHandler = new PhysicalInputHandler();
                break;
        case InputType.Touchscreen:
                //TODO touchscreen input
                break;
            default:
                throw new MissingComponentException("Can't decode camera mode : " + m_cameraMode);
        }
    }
 public void SetMovementManager(IMovementManager movementManager)
 {
     this.movementManager = movementManager;
 }
 private void Awake()
 {
     movementManager = GetComponent <IMovementManager>();
 }
Esempio n. 30
0
 public IGameBuilder MovementManager(IMovementManager movementManager)
 {
     this._movementManager = movementManager;
     return(this);
 }
Esempio n. 31
0
 public Game(GameType type, IGameController controller, IMovementManager movementManager)
 {
     this.Type            = type;
     this.Controller      = controller;
     this.MovementManager = movementManager;
 }