示例#1
0
        public virtual void update(Bullet_motor motor)
        {
            float time = current_life_span / life_span;

            motor.desire_speed =
                speed_over_life_span.Evaluate(time) * max_speed;
        }
示例#2
0
        public virtual void start(Bullet_motor motor)
        {
            var transform = motor.transform;
            var rotation_to_current_direction =
                Quaternion.Euler(motor.desire_direction);
            var rotation_to_add_angle = Quaternion.Euler(0, rotate_angle_on_start, 0);

            motor.desire_direction =
                (rotation_to_current_direction * rotation_to_add_angle)
                * motor.desire_direction;
        }
示例#3
0
 public virtual void prepare(Bullet_motor motor)
 {
     if (use_max_speed)
     {
         max_speed = motor.max_speed;
     }
     else
     {
         max_speed = motor.desire_speed;
     }
 }