lib/lotu/systems/steering_system.rb in lotu-0.1.15 vs lib/lotu/systems/steering_system.rb in lotu-0.1.16
- old
+ new
@@ -1,11 +1,12 @@
# -*- coding: utf-8 -*-
module Lotu
- class SteeringSystem < System
+ class SteeringSystem < BaseSystem
def initialize(user, opts={})
super
+
# Add new functionality to Actor
@user.extend UserMethods
# Initialize attributes
default_opts = {
@@ -15,10 +16,9 @@
:max_force => 300,
:wander_radius => 120,
:wander_distance => 240.0
}
opts = default_opts.merge!(opts)
-
@user.mass = opts[:mass]
@user.max_speed = opts[:max_speed]
@user.max_turn_rate = opts[:max_turn_rate]
@user.max_force = opts[:max_force]
@user.wander_radius = opts[:wander_radius]