Copyright (c) 2011 Andrey Moiseev, http://o2genum.ru
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),...
If you think the Android project ShootEmOff listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.shootemoff.game;
//www.java2s.com/**
*
* @author Kristaps
* Class stores user settings. Used when initializing a new game to set up th screen and game experience
*/publicclass OptionsObject
{
public OptionsObject(){}
/**
* @param reload - offset between gunshots
* @param diff - difficulty level [1 - 3]
* @param shield_left - shield position, swapping shield/gun control
* @param sound_on - sound effects on collisions
* @param vibr_on - vibration effects on collisions
*/public OptionsObject(
int reload,
int diff,
int shield_left,
int sound,
int vibration
)
{
gun_reload_time = reload;
difficulty = diff;
lefty = shield_left;
sound_on = sound;
vibration_on = vibration;
}
publicint GetGunOffset()
{
return gun_reload_time;
}
publicvoid SetGunOffset(int time)
{
gun_reload_time = time;
}
//min time between gunshots
privateint gun_reload_time;
//novice = 1 up to 5
privateint difficulty;
//control pad placement
privateint lefty;
//
privateint sound_on;
privateint vibration_on;
}