Пример #1
0
        private void Awake()
        {
            SpriteAnimConfg eagleConfig = Resources.Load <SpriteAnimConfg>("Eagle");

            _eagleAnimator = new SpriteAnimator(eagleConfig);
            _eagleAnimator.StartAnimation(_characterViews[1]._spriteRenderer, AnimState.Idle, true, _playeranimationSpeed);
            _eagleController = new EagleMove(_characterViews[1], _eagleAnimator);
            SpriteAnimConfg foxyConfig = Resources.Load <SpriteAnimConfg>("Foxy");

            _foxyAnimator = new SpriteAnimator(foxyConfig);
            _foxyAnimator.StartAnimation(_characterViews[0]._spriteRenderer, AnimState.Idle, true, _playeranimationSpeed);
            _foxyController = new FoxyMove(_characterViews[0], _foxyAnimator);
            SpriteAnimConfg frogConfig = Resources.Load <SpriteAnimConfg>("Frog");

            _frogAnimator = new SpriteAnimator(frogConfig);
            _frogAnimator.StartAnimation(_characterViews[2]._spriteRenderer, AnimState.Idle, true, _playeranimationSpeed);
            _frogController   = new FrogMove(_characterViews[2], _wallList, _frogAnimator);
            _cameraController = new CameraController(_characterViews, _camera);
            _itemManager      = new ItemManager(_characterViews, _itemList, _inventory);
        }
Пример #2
0
 public SpriteAnimator(SpriteAnimConfg config)
 {
     _config = config;
 }