Ejemplo n.º 1
0
 public string getTitle(FishesInfo fishesInfo)
 {
     switch(type) {
         case Type.COUNT :
             return title + " : " + (int)(value - fishesInfo.FishesCount);
         case Type.WEIGHT :
             return title + " : " + FishesInfo.formatWeight(value - fishesInfo.getWeight());
         case Type.GROUPER :
             return title + " : " + (int)(value - fishesInfo.getCountByType(FishesInfo.GROUPER));
         case Type.REDSNAPPER :
             return title + " : " + (int)(value - fishesInfo.getCountByType(FishesInfo.REDSNAPPER));
         case Type.YELLOWFINTUNA :
             return title + " : " + (int)(value - fishesInfo.getCountByType(FishesInfo.YELLOWFINTUNA));
         case Type.DIFFERENT :
          	return title + " : " + (int)(value - fishesInfo.getDifferentFishesCount());
     }
     return title;
 }
Ejemplo n.º 2
0
 public bool Check(FishesInfo fishesInfo)
 {
     switch(type) {
         case Type.COUNT :
             return (int)value <= fishesInfo.FishesCount ? true : false;
         case Type.WEIGHT :
             return value <= fishesInfo.getWeight() ? true : false;
         case Type.GROUPER :
             return (int)value <= fishesInfo.getCountByType(FishesInfo.GROUPER) ? true : false;
         case Type.REDSNAPPER :
             return (int)value <= fishesInfo.getCountByType(FishesInfo.REDSNAPPER) ? true : false;
         case Type.YELLOWFINTUNA :
             return (int)value <= fishesInfo.getCountByType(FishesInfo.YELLOWFINTUNA) ? true : false;
         case Type.DIFFERENT :
             return (int)value <= fishesInfo.getDifferentFishesCount() ? true : false;
     }
     return true;
 }
Ejemplo n.º 3
0
 public void InitDefault(int arg)
 {
     timer = 0.0f;
     fishesInfo = new FishesInfo();
     taskTime = (arg < tasksTime.Length) ? tasksTime[arg] : 120.0f;
     activeTasks = (arg < levelsTasks.Count) ? (Task[])levelsTasks[arg] : null;
     CheckTasks();
 }
Ejemplo n.º 4
0
 void Awake()
 {
     useGUILayout = false;
     IsFreeVersion = PlayerPrefs.HasKey("IsFreeVersion") ? PlayerPrefs.GetInt("IsFreeVersion") > 0 ? true : false : false;
     fader = new Fader(fade);
     buttonFire = new HighlightableControlButton(this, fireButtonGUI, fireButtonOn, fireButtonOff, fireButtonHighlight);
     buttonBoost = new HighlightableControlButton(this, boostButtonGUI, boostButtonOn, boostButtonOff, boostButtonHighlight);
     buttonAim =  new HighlightableControlButton(this, aimButtonGUI, aimButtonOn, aimButtonOff, aimButtonHighlight);
     fishesInfo = new FishesInfo();
     airTankLevel = new ValueHolder(airTank.Length - 1);
     airTankLevel.Subscribe(OnAirTankLevelChanged);
 }