46 lines
784 B
C#
46 lines
784 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[Serializable]
|
|
public class AquariumSettings
|
|
{
|
|
public int id = -1;
|
|
|
|
public int fishLimitCount = 100;
|
|
|
|
public int fishLimitWeight = 20;
|
|
|
|
[HideInInspector]
|
|
public string name;
|
|
|
|
public AquariumWaterType waterType = AquariumWaterType.Undefined;
|
|
|
|
public int enviroPreset = -1;
|
|
|
|
[HideInInspector]
|
|
public int currentFishCount;
|
|
|
|
public AquariumSettings(AquariumSettings other)
|
|
{
|
|
id = other.id;
|
|
name = other.name;
|
|
waterType = other.waterType;
|
|
enviroPreset = other.enviroPreset;
|
|
}
|
|
|
|
public bool IsCreated()
|
|
{
|
|
return waterType != AquariumWaterType.Undefined && enviroPreset != -1;
|
|
}
|
|
|
|
public bool IsMaxCapacityReached()
|
|
{
|
|
return currentFishCount >= fishLimitCount;
|
|
}
|
|
|
|
public bool HasAnyFish()
|
|
{
|
|
return currentFishCount > 0;
|
|
}
|
|
}
|