Exemplo n.º 1
0
        public void Init(WeaponType weaponType, float damage, BulletsPool bulletsPool, VfxController vfxController)
        {
            Damage     = damage;
            WeaponType = weaponType;

            m_bulletsPool   = bulletsPool;
            m_vfxController = vfxController;
        }
Exemplo n.º 2
0
        public void Init(VfxController vfxController)
        {
            m_vfxController = vfxController;

            m_available = new Dictionary <WeaponType, List <Bullet> >();

            for (int i = 0; i < (int)WeaponType.COUNT; i++)
            {
                m_available.Add((WeaponType)i, new List <Bullet>());
            }
        }
Exemplo n.º 3
0
        public void Init(VfxController vfxController, BulletsPool bulletsPool, IRestartGame restartGame)
        {
            m_restartGame = restartGame;

            m_tankWeaponChange.Init(m_tankData.prevWeaponButton, m_tankData.nextWeaponButton);
            m_tankMovement.Init(m_tankData.movementAxisName, m_tankData.turnAxisName,
                                m_tankData.speed, m_tankData.turnSpeed);
            m_healthController.Init(m_tankData.health, m_tankData.defense, this);
            m_tankShooting.Init(m_tankData.fireButton, m_tankWeaponChange, bulletsPool);
            m_tankDamageReceiver.Init(m_healthController, vfxController);
        }
Exemplo n.º 4
0
        public void Init(IHealth healthController, VfxController vfxController)
        {
            m_healthController = healthController;
            m_vfxController    = vfxController;

            m_spriteRenderers = new List <SpriteRenderer>();
            SearchForComponentRecursively <SpriteRenderer>(m_spriteRenderers, this.transform);

            m_colliders = new List <Collider2D>();
            SearchForComponentRecursively <Collider2D>(m_colliders, this.transform);
        }