public void OnEnable() { m_editHelp = new EditHelp(); m_editHelp.AddPropertyInterface( "m_targetTag", new EditHelp.TagPropertyInterface( "Tag tag", "The tags used to identify possible targets.")); m_editHelp.AddPropertyInterface( "m_switchToClosest", new EditHelp.BoolPropertyInterface( "Switch to closest", "Whether or not to switch to another target if it is closer than the current target.", "TRUE: Turret will continually switch to the closest valid target.", "FALSE: Turret will continue to track current target even if another one comes closer.")); m_switchIfInvalid = new EditHelp.BoolPropertyInterface( "Switch if invalid", "Whether or not to switch to another target if the current one goes out of range (only valid with an AimerLimits component).", "TRUE: Turret will switch to another target if it cannot track the current one.", "FALSE: Turret will continue to track current target even if it goes out of bounds."); m_editHelp.AddPropertyInterface("m_switchOnInvalid", m_switchIfInvalid); }
void OnEnable() { m_editHelp.AddPropertyInterface( "m_targetObject", new EditHelp.PropertyInterface( "Target to aim at", "This is the object that the aimer will be aiming at.")); m_editHelp.AddPropertyInterface( "m_targetType", new EditHelp.EnumPropertyInterface( "Target Type", "The type of movement the target is expected to have.", "Linear: targets move at a constant speed in a straight line unaffacted by gravity.", "Parabolic: targets move in an arc, affected by gravity.", "Circular: Use for players and AI-controlled targets.\nTarget motion is estimated using a curve.")); //"Autodetect: detect target type automatically (uses more CPU)") ); m_editHelp.AddPropertyInterface( "m_projectileType", new EditHelp.EnumPropertyInterface( "Projectile Type", "Choose Projectile type:", "Instant: Projectile hits the target instantaneously", "Linear: Projectile moves at a constant speed in a straight line.", "Parabolic: Projectile moves affected only by gravity.")); m_editHelp.AddPropertyInterface( "m_bulletVelocity", new EditHelp.PropertyInterface( "Projectile speed", "Speed the projectile is launched at.")); m_gunObject = new EditHelp.PropertyInterface( "Gun barrel object", "This is the object that will be aimed to point in the firing direction."); m_editHelp.AddPropertyInterface("m_gunObject", m_gunObject); m_swivelObject = new EditHelp.PropertyInterface( "Optional Swivel Base object", "This property is optional. If set, it is used at the swivel base for the turret."); m_editHelp.AddPropertyInterface("m_optionalSwivel", m_swivelObject); m_bulletSpeed = new EditHelp.PropertyInterface( "Bullet speed", "This should match the speed that your bullets are launched at."); m_editHelp.AddPropertyInterface("m_projectileSpeed", m_bulletSpeed); m_editHelp.AddPropertyInterface( "m_artificalStupidity", new EditHelp.SliderPropertyInterface( "Artificial Stupidity", "Use this to make the aimer a little less mercilessly accurate.\n" + "If set to zero, the aiming will be accurate - if set to 1, the aimer will just point directly at the target.", 0.0f, 1.0f)); m_applyToBarrel = new EditHelp.BoolPropertyInterface( "Apply aim to barrel", "Whether or not apply the aim directly to the gun object", "TRUE: The gun object will be immediately aimed to hit the target", ""); m_editHelp.AddPropertyInterface("m_applyAimToBarrel", m_applyToBarrel); m_maxIterations = new EditHelp.PropertyInterface( "Maximum Iterations", ""); m_editHelp.AddPropertyInterface("m_maximumIterations", m_maxIterations); m_maximumInaccuracy = new EditHelp.PropertyInterface( "Maximum Inaccuracy", ""); m_editHelp.AddPropertyInterface("m_maximumInaccuracy", m_maximumInaccuracy); /* * m_editHelp.AddPropertyInterface( * "m_inaccuracyAngle", new EditHelp.SliderPropertyInterface( * "Angle of inaccuracy", * "If set to a value of greater than zero, the aim direction will be offset by a random amount up to this angle.\n" + * "Good to use if you don't want your turrets to be too accurate.\n" + * "0 = deadly accurate, 45 = can barely point in the right direction.", * 0, 90.0f) ); */ }