예제 #1
0
        protected override void OnStartRunning()
        {
            _query = EntityManager.CreateEntityQuery(typeof(SpriteAnimationData));
            _animationDataProvider = ResourceLocator <AnimationDataProvider> .GetResourceProvider();

            _sequenceDataMap = _animationDataProvider.GetSequenceDataMap();
        }
예제 #2
0
        protected override void OnCreate()
        {
            _propertyBlock    = new MaterialPropertyBlock();
            _graphicsProvider = ResourceLocator <HealthBarGraphicsProvider> .GetResourceProvider();

            _query = Entities
                     .WithAllReadOnly <UIHealthBar, Health, Translation, Scale>()
                     .ToEntityQuery();
        }
예제 #3
0
        private void Start()
        {
            var animationDataProvider = ResourceLocator <AnimationDataProvider> .GetResourceProvider();

            _animationSequence = animationDataProvider.GetAnimationSequence(AnimationEntityType.Enemy);

            if (_spawnOne)
            {
                _spawnBatchSize = 1;
            }
        }
        protected override void OnStartRunning()
        {
            _matrices = new Matrix4x4[DRAW_MESH_BATCH];
            _uvs      = new Vector4[DRAW_MESH_BATCH];

            var animationDataProvider = ResourceLocator <AnimationDataProvider> .GetResourceProvider();

            _mesh     = animationDataProvider.Mesh;
            _material = animationDataProvider.Material;

            _query = Entities.WithAllReadOnly <Sprite>().ToEntityQuery();
        }