Exemplo n.º 1
0
 void IEcsRunSystem.Run()
 {
     // add your run code here.
     foreach (var index in _asteroidFilter)
     {
         ref TransformRef   asteroidTransformRefComponent   = ref _asteroidFilter.Get2(index);
         ref ColliderRadius asteroidColliderRadiusComponent = ref _asteroidFilter.Get3(index);
 void IEcsRunSystem.Run()
 {
     // add your run code here.
     foreach (var index in _filterMovingEnemy)
     {
         ref TransformRef  TransformRefComponent  = ref _filterMovingEnemy.Get3(index);
         ref GameEntityRef GameEntityRefComponent = ref _filterMovingEnemy.Get2(index);
Exemplo n.º 3
0
        void IEcsRunSystem.Run()
        {
            // add your run code here.

            foreach (var index1 in _filterBullets)
            {
                ref TransformRef  bulletTransformRefComponent  = ref _filterBullets.Get2(index1);
                ref GameEntityRef bulletGameEntityRefComponent = ref _filterBullets.Get3(index1);
Exemplo n.º 4
0
 void IEcsRunSystem.Run()
 {
     // add your run code here.
     foreach (var index in _filterUnplaced)
     {
         TransformRef transformRefComponent = _filterUnplaced.Get2(0);
         Vector3      newPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
         newPos.z = 0;
         transformRefComponent.transform.position = newPos;
     }
 }
        void IEcsRunSystem.Run()
        {
            // add your run code here.
            foreach (var index in _filterBullet)
            {
                ref TransformRef transformRefComponent = ref _filterBullet.Get2(index);

                Vector3 dir  = new Vector3(0, 1, 0);
                Vector3 move = dir * config.BulletSpeed * Time.deltaTime * 10f;

                transformRefComponent.value.Translate(move);
            }
        void IEcsRunSystem.Run()
        {
            // add your run code here.
            if (config.JoyStick)
            {
                foreach (var index in _filterControl)
                {
                    ref Direction dirComponent   = ref _filterControl.Get1(index);
                    ref Power     powerComponent = ref _filterControl.Get2(index);

                    foreach (var index1 in _filterControllable)
                    {
                        ref TransformRef transformRefComponent = ref _filterControllable.Get2(index1);
                        ref AllLimits    allLimitsComponent    = ref _filterControllable.Get3(index1);
        void IEcsRunSystem.Run()
        {
            // add your run code here.
            foreach (var index1 in _filterPlayer)
            {
                ref TransformRef playerTransformRefComponent = ref _filterPlayer.Get1(index1);

                foreach (var index in _filterMap)
                {
                    //Debug.Log("s");
                    ref TransformRef transformRefComponent = ref _filterMap.Get1(index);

                    Vector3 down = new Vector3(0, -1, 0);
                    transformRefComponent.value.Translate(down * Time.deltaTime * config.GameSpeed * 10f);

                    if (transformRefComponent.value.position.y <= -17.5)
                    {
                        transformRefComponent.value.Translate(new Vector3(0, 35, 0));
                    }
                }