public void Setup(ISpaceShipDataInit data) { var ddata = (SpaceShipDataSetup)data; _hp = ddata.hp; _fuel = ddata.fuel; _temp = ddata.temp; _peoples = ddata.peoples; _modHP = new float[GameManager.SPACE_SIZE]; _modFUEL = new float[GameManager.SPACE_SIZE]; _modTEMP = new float[GameManager.SPACE_SIZE]; }
public void Init(ISpaceShipDataInit data) { var ddata = ( SpaceShipDataInit )data; _hp = ddata.hp; _fuel = ddata.fuel; _temp = ddata.temp; _actionMatrix = new Dictionary <ActionType, BitArray>(); _actionMatrix.Add(ActionType.CONSUME, new BitArray(ddata.spaceSize, false)); _actionMatrix.Add(ActionType.PROTECTION, new BitArray(ddata.spaceSize, false)); _actionMatrix.Add(ActionType.TEMPERATURE, new BitArray(ddata.spaceSize, false)); _modHP = new float[GameManager.SPACE_SIZE]; _modFUEL = new float[GameManager.SPACE_SIZE]; _modTEMP = new float[GameManager.SPACE_SIZE]; }