///////////////////////////////////////////////////////////////////////////// // //Properties // ///////////////////////////////////////////////////////////////////////////// // //Initializers // protected override void InitializeInStart() { base.InitializeInStart(); //playerTransform = FindObjectOfType<PlayerShip>().transform; aliveChickens = new List <DataWithIndex <List <DataWithIndex <Chicken> > > >(ArmyColumnsNumber); //set min and max shoot time gaps OptionData.Difficulty difficulty = GameData.Singleton.GameOptionData.GameDifficulty; if (difficulty == OptionData.Difficulty.Easy) { minShootTimeGap = EASY_MIN_SHOOT_TIME_GAP; maxShootTimeGap = EASY_MAX_SHOOT_TIME_GAP; } else if (difficulty == OptionData.Difficulty.Normal) { minShootTimeGap = NORMAL_MIN_SHOOT_TIME_GAP; maxShootTimeGap = NORMAL_MAX_SHOOT_TIME_GAP; } else { minShootTimeGap = HARD_MIN_SHOOT_TIME_GAP; maxShootTimeGap = HARD_MAX_SHOOT_TIME_GAP; } //single chicken shooting initialization shootTimeGap = GetRandomTime(); }
protected override void Initialize() { transform = base.transform; //set bullet speed OptionData.Difficulty difficulty = GameData.Singleton.GameOptionData.GameDifficulty; if (difficulty == OptionData.Difficulty.Easy) { bulletSpeed = EASY_BULLET_SPEED; } else if (difficulty == OptionData.Difficulty.Normal) { bulletSpeed = NORMAL_BULLET_SPEED; } else { bulletSpeed = HARD_BULLET_SPEED; } //set speed if (speed <= 0) { speed = DEFAULT_SPEED; } //get to position StartCoroutine(GetToPosition()); }