public static void Create() { money = 160; health = 25; color = Colorable.TeamColor.Red; wavesController = new WavesController(Colorable.TeamColor.Blue); wavesController.Load(Settings.settingsPath); }
public WavesController(Colorable.TeamColor _color) { color = _color; isWaitingForWave = true; currentTime = 0; waves = new Dictionary <float, List <WaveElement> > (); toUse = new List <WaveElement> (); }
public static void Create() { money = 150; health = 25; playProgress = 0; color = Colorable.TeamColor.Blue; wavesController = new WavesController(color); wavesController.Load(Settings.settingsPath); }
public Tower(string _type, Colorable.TeamColor _color) { reloadTime = 0.6f; type = _type; color = _color; gameObject = GamePullController.CreateImage(); animation = new ObjectAnimation(gameObject); gameObject.name += "Tower"; gameObject.GetComponent <BoxCollider> ().enabled = true; texture = Resources.Load("Textures/Towers/" + type + "Tower") as Texture; attackAnimaton = type + "TowerAttack"; attackAnimatonTime = 0.2f; try { damage = BalanceSettings.damage [type]; damageDelta = BalanceSettings.deltaDamage [type]; attackRange = BalanceSettings.attackRange [type]; attackSpeed = BalanceSettings.attackSpeed [type]; } catch (Exception) { Debug.LogError("Wrong tower type: " + type); } layer = 6; size = new Vector2(texture.width / 50f, texture.height / 50f) / 2f * Settings.FhdToHD; GameController.towers.Add(this); GameController.towersDictionary.Add(gameObject, this); buffs = new Dictionary <Buff, float> (GameController.buffs[color]); foreach (var buff in TowersSettings.Buffs(type)) { buffs.Add((Buff)Enum.Parse(typeof(Buff), buff), 1); } }