Ejemplo n.º 1
0
        protected override void _init_cache()
        {
            base._init_cache();

            catch_radar = new chibi.radar.Radar_box(catch_radar);
            dodge_radar = new chibi.radar.Radar_box(dodge_radar);

            hp_motor = GetComponent <chibi.damage.motor.HP_engine>();
            if (!hp_motor)
            {
                debug.error("no se encontro un hp_engine");
            }

            counter_pomodoro           = Pomodoro.CreateInstance <Pomodoro>();
            counter_pomodoro.frecuency = counter_time;
            counter_pomodoro.reset();
            hp_motor.on_died += on_died;
        }
Ejemplo n.º 2
0
        public List <Controller_bullet> shot()
        {
            if (has_the_ball && gun.is_load)
            {
                var bullet = gun.shot();
                has_the_ball = false;
                counter_pomodoro.reset();

                var bullet_motor = (
                    SMKD.motor.weapons.gun.bullet.Bullet_bounce_motor)bullet.motor;

                // bullet_motor.last_shotter = this;
                // bullet_motor.current_live_time = 0f;

                return(new List <Controller_bullet>()
                {
                    bullet
                });
            }
            return(null);
        }