示例#1
0
    public void Init(GameObject bullet, Vector2 position)
    {
        _dataManager      = GameClient.Get <IDataManager>();
        _levelManager     = GameClient.Get <ILevelManager>();
        _bulletManager    = GameClient.Get <IBulletManager>();
        _spiderManager    = GameClient.Get <ISpiderManager>();
        _mushroomManager  = GameClient.Get <IMushroomManager>();
        _centipedeManager = GameClient.Get <ICentipedeManager>();

        _bullet   = bullet.transform;
        _position = position;

        _speed  = _dataManager.GameBalanceData.Game.GetBulletSpeed();
        _damage = _dataManager.GameBalanceData.Game.GetBulletDamage();

        _gridMaxHeight = _dataManager.GameBalanceData.Game.GetGridSize().y;

        _bullet.transform.position = _position;
        _bullet.gameObject.SetActive(true);

        _targetPosition = _bullet.position;
        _canMove        = true;
    }
示例#2
0
 public CrawlController(ILogger <CrawlController> logger, ISpiderManager manager)
 {
     this.logger  = logger;
     this.manager = manager;
 }